Allow disabling similar, related & more apps in app details page

This commit is contained in:
Rahul Kumar Patel
2021-04-04 03:57:33 +05:30
parent 2dd570dd05
commit a76638af0d
5 changed files with 15 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ object Preferences {
const val PREFERENCE_DEFAULT_SELECTED_TAB = "PREFERENCE_DEFAULT_SELECTED_TAB"
const val PREFERENCE_QUICK_EXIT = "PREFERENCE_QUICK_EXIT"
const val PREFERENCE_FOR_YOU = "PREFERENCE_FOR_YOU"
const val PREFERENCE_SIMILAR = "PREFERENCE_SIMILAR"
const val PREFERENCE_INTRO = "PREFERENCE_INTRO"
const val PREFERENCE_FILTER_GOOGLE = "PREFERENCE_FILTER_GOOGLE"

View File

@@ -363,7 +363,9 @@ class AppDetailsActivity : BaseDetailsActivity() {
inflateBetaSubscription(B.layoutDetailsBeta, app)
}
inflateAppStream(B.epoxyRecyclerStream, app)
if (Preferences.getBoolean(this, Preferences.PREFERENCE_SIMILAR)) {
inflateAppStream(B.epoxyRecyclerStream, app)
}
}
}

View File

@@ -42,6 +42,7 @@ import com.aurora.store.util.Preferences.PREFERENCE_INSECURE_ANONYMOUS
import com.aurora.store.util.Preferences.PREFERENCE_INSTALLER_ID
import com.aurora.store.util.Preferences.PREFERENCE_INTRO
import com.aurora.store.util.Preferences.PREFERENCE_QUICK_EXIT
import com.aurora.store.util.Preferences.PREFERENCE_SIMILAR
import com.aurora.store.util.Preferences.PREFERENCE_THEME_ACCENT
import com.aurora.store.util.Preferences.PREFERENCE_THEME_TYPE
import com.aurora.store.util.save
@@ -168,6 +169,7 @@ class OnboardingActivity : BaseActivity() {
save(PREFERENCE_DEFAULT_SELECTED_TAB, 0)
save(PREFERENCE_QUICK_EXIT, false)
save(PREFERENCE_FOR_YOU, true)
save(PREFERENCE_SIMILAR, true)
/*Installer*/
save(PREFERENCE_AUTO_DELETE, true)

View File

@@ -298,6 +298,8 @@
<string name="pref_ui_quick_exit_desc">"Exit app on single back action"</string>
<string name="pref_ui_no_for_you">"For You Pages"</string>
<string name="pref_ui_no_for_you_desc">"Display For You Pages on home screen"</string>
<string name="pref_ui_similar_apps">"Similar and related apps"</string>
<string name="pref_ui_similar_apps_desc">"Display similar and related clusters on app details page"</string>
<string name="purchase_failed">"Download Failed"</string>
<string name="purchase_invalid">"App not purchased"</string>
<string name="purchase_unsupported">"App not supported"</string>

View File

@@ -69,4 +69,11 @@
app:key="PREFERENCE_FOR_YOU"
app:summary="@string/pref_ui_no_for_you_desc"
app:title="@string/pref_ui_no_for_you" />
<SwitchPreferenceCompat
app:defaultValue="true"
app:iconSpaceReserved="false"
app:key="PREFERENCE_SIMILAR"
app:summary="@string/pref_ui_similar_apps_desc"
app:title="@string/pref_ui_similar_apps" />
</androidx.preference.PreferenceScreen>