diff --git a/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelMonetizationFragment.kt b/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelMonetizationFragment.kt
index 4fbdf607..20b6f5b4 100644
--- a/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelMonetizationFragment.kt
+++ b/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelMonetizationFragment.kt
@@ -1,22 +1,20 @@
package com.futo.platformplayer.fragment.channel.tab
-import android.content.Intent
-import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.TextView
import androidx.fragment.app.Fragment
import com.futo.platformplayer.R
import com.futo.platformplayer.api.media.models.channels.IPlatformChannel
import com.futo.platformplayer.fragment.mainactivity.main.PolycentricProfile
-import com.futo.platformplayer.logging.Logger
import com.futo.platformplayer.views.SupportView
-import com.futo.platformplayer.views.buttons.BigButton
class ChannelMonetizationFragment : Fragment, IChannelTabFragment {
private var _supportView: SupportView? = null
+ private var _textMonetization: TextView? = null
private var _lastChannel: IPlatformChannel? = null;
private var _lastPolycentricProfile: PolycentricProfile? = null;
@@ -26,21 +24,22 @@ class ChannelMonetizationFragment : Fragment, IChannelTabFragment {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.fragment_channel_monetization, container, false);
_supportView = view.findViewById(R.id.support);
+ _textMonetization = view.findViewById(R.id.text_monetization);
_lastChannel?.also {
setChannel(it);
};
- _lastPolycentricProfile?.also {
- setPolycentricProfile(it, animate = false);
- }
-
+ _supportView?.visibility = View.GONE;
+ _textMonetization?.visibility = View.GONE;
+ setPolycentricProfile(_lastPolycentricProfile, animate = false);
return view;
}
override fun onDestroyView() {
super.onDestroyView();
_supportView = null;
+ _textMonetization = null;
}
override fun setChannel(channel: IPlatformChannel) {
@@ -49,7 +48,15 @@ class ChannelMonetizationFragment : Fragment, IChannelTabFragment {
fun setPolycentricProfile(polycentricProfile: PolycentricProfile?, animate: Boolean) {
_lastPolycentricProfile = polycentricProfile
- _supportView?.setPolycentricProfile(polycentricProfile, animate)
+ if (polycentricProfile != null) {
+ _supportView?.setPolycentricProfile(polycentricProfile, animate)
+ _supportView?.visibility = View.VISIBLE
+ _textMonetization?.visibility = View.GONE
+ } else {
+ _supportView?.setPolycentricProfile(null, animate)
+ _supportView?.visibility = View.GONE
+ _textMonetization?.visibility = View.VISIBLE
+ }
}
companion object {
diff --git a/app/src/main/res/layout/fragment_channel_monetization.xml b/app/src/main/res/layout/fragment_channel_monetization.xml
index 0394cc7d..e41a8ee6 100644
--- a/app/src/main/res/layout/fragment_channel_monetization.xml
+++ b/app/src/main/res/layout/fragment_channel_monetization.xml
@@ -6,5 +6,18 @@
+ android:layout_height="match_parent"
+ android:visibility="gone"/>
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index eb583b4a..e326299a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -643,6 +643,7 @@
This creator has not set any support options on Harbor (Polycentric)
Load More
Stopped after {requestCount} to avoid rate limit, click load more to load more.
+ This creator has not setup any monetization features
- Recommendations
- Subscriptions