make advance filter list enabled for fdroid

This commit is contained in:
Tlaster 2021-03-01 16:32:09 +08:00
parent c1430497ac
commit b1557f17be
4 changed files with 10 additions and 9 deletions

View File

@ -26,4 +26,4 @@ import org.mariotaku.twidere.util.premium.ExtraFeaturesService.Companion.FEATURE
* Created by mariotaku on 2017/9/14.
*/
val ExtraFeaturesService.isAdvancedFiltersEnabled: Boolean
get() = isEnabled(FEATURE_ADVANCED_FILTERS) || isEnabled("filters_subscriptions")
get() = true//isEnabled(FEATURE_ADVANCED_FILTERS) || isEnabled("filters_subscriptions")

View File

@ -115,7 +115,7 @@ class FilteredUsersFragment : BaseFiltersFragment() {
override fun onPrepareOptionsMenu(menu: Menu) {
super.onPrepareOptionsMenu(menu)
val isFeaturesSupported = extraFeaturesService.isSupported()
menu.setGroupAvailability(R.id.import_export, isFeaturesSupported)
menu.setGroupAvailability(R.id.import_export, true)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
@ -147,7 +147,7 @@ class FilteredUsersFragment : BaseFiltersFragment() {
override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {
val result = super.onPrepareActionMode(mode, menu)
val isFeaturesSupported = extraFeaturesService.isSupported()
menu.setGroupAvailability(R.id.import_export, isFeaturesSupported)
menu.setGroupAvailability(R.id.import_export, true)
return result && menu.hasVisibleItems()
}

View File

@ -71,8 +71,8 @@ class FiltersSubscriptionsFragment : BaseFragment(), LoaderManager.LoaderCallbac
if (!extraFeaturesService.isSupported()) {
activity?.finish()
return
// activity?.finish()
// return
}
if (savedInstanceState == null) {

View File

@ -10,14 +10,15 @@
android:defaultValue="false"
android:key="filter_possibility_sensitive_statuses"
android:title="@string/preference_filter_possibility_sensitive_statuses"/>
<org.mariotaku.twidere.preference.PremiumEntryPreferenceCategory android:title="@string/preference_title_filter_subscriptions">
<org.mariotaku.twidere.preference.PremiumEntryPreference
<org.mariotaku.twidere.preference.TintedPreferenceCategory
android:title="@string/preference_title_filter_subscriptions">
<Preference
android:key="manage_filter_subscriptions"
android:title="@string/preference_title_filter_manage_subscriptions">
<intent
android:data="twidere://filters/subscriptions"
android:targetClass="org.mariotaku.twidere.activity.LinkHandlerActivity"
android:targetPackage="org.mariotaku.twidere"/>
</org.mariotaku.twidere.preference.PremiumEntryPreference>
</org.mariotaku.twidere.preference.PremiumEntryPreferenceCategory>
</Preference>
</org.mariotaku.twidere.preference.TintedPreferenceCategory>
</PreferenceScreen>