mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
hide download all extension button
This commit is contained in:
parent
7de0c1a282
commit
77fe205e6c
2 changed files with 8 additions and 2 deletions
|
@ -10,6 +10,7 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import com.lagradost.cloudstream3.APIHolder.getApiProviderLangSettings
|
import com.lagradost.cloudstream3.APIHolder.getApiProviderLangSettings
|
||||||
import com.lagradost.cloudstream3.AllLanguagesName
|
import com.lagradost.cloudstream3.AllLanguagesName
|
||||||
|
import com.lagradost.cloudstream3.BuildConfig
|
||||||
import com.lagradost.cloudstream3.R
|
import com.lagradost.cloudstream3.R
|
||||||
import com.lagradost.cloudstream3.TvType
|
import com.lagradost.cloudstream3.TvType
|
||||||
import com.lagradost.cloudstream3.databinding.FragmentPluginsBinding
|
import com.lagradost.cloudstream3.databinding.FragmentPluginsBinding
|
||||||
|
@ -70,6 +71,8 @@ class PluginsFragment : Fragment() {
|
||||||
val name = arguments?.getString(PLUGINS_BUNDLE_NAME)
|
val name = arguments?.getString(PLUGINS_BUNDLE_NAME)
|
||||||
val url = arguments?.getString(PLUGINS_BUNDLE_URL)
|
val url = arguments?.getString(PLUGINS_BUNDLE_URL)
|
||||||
val isLocal = arguments?.getBoolean(PLUGINS_BUNDLE_LOCAL) == true
|
val isLocal = arguments?.getBoolean(PLUGINS_BUNDLE_LOCAL) == true
|
||||||
|
// download all extensions button
|
||||||
|
val downloadAllButton = binding?.settingsToolbar?.menu?.findItem(R.id.download_all)
|
||||||
|
|
||||||
if (url == null || name == null) {
|
if (url == null || name == null) {
|
||||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||||
|
@ -171,7 +174,7 @@ class PluginsFragment : Fragment() {
|
||||||
|
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
// No download button and no categories on local
|
// No download button and no categories on local
|
||||||
binding?.settingsToolbar?.menu?.findItem(R.id.download_all)?.isVisible = false
|
downloadAllButton?.isVisible = false
|
||||||
binding?.settingsToolbar?.menu?.findItem(R.id.lang_filter)?.isVisible = false
|
binding?.settingsToolbar?.menu?.findItem(R.id.lang_filter)?.isVisible = false
|
||||||
pluginViewModel.updatePluginListLocal()
|
pluginViewModel.updatePluginListLocal()
|
||||||
|
|
||||||
|
@ -179,6 +182,8 @@ class PluginsFragment : Fragment() {
|
||||||
} else {
|
} else {
|
||||||
pluginViewModel.updatePluginList(context, url)
|
pluginViewModel.updatePluginList(context, url)
|
||||||
binding?.tvtypesChipsScroll?.root?.isVisible = true
|
binding?.tvtypesChipsScroll?.root?.isVisible = true
|
||||||
|
// not needed for users but may be useful for devs
|
||||||
|
downloadAllButton?.isVisible = BuildConfig.DEBUG
|
||||||
|
|
||||||
bindChips(
|
bindChips(
|
||||||
binding?.tvtypesChipsScroll?.tvtypesChips,
|
binding?.tvtypesChipsScroll?.tvtypesChips,
|
||||||
|
|
|
@ -21,5 +21,6 @@
|
||||||
android:id="@+id/download_all"
|
android:id="@+id/download_all"
|
||||||
android:icon="@drawable/netflix_download"
|
android:icon="@drawable/netflix_download"
|
||||||
android:title="@string/batch_download"
|
android:title="@string/batch_download"
|
||||||
app:showAsAction="collapseActionView|ifRoom" />
|
app:showAsAction="collapseActionView|ifRoom"
|
||||||
|
android:visible="false"/>
|
||||||
</menu>
|
</menu>
|
Loading…
Add table
Add a link
Reference in a new issue