Revert "Allow hiding promotional apps"

This reverts commit 2cb10c2fd4.
This commit is contained in:
Rahul Kumar Patel
2021-05-27 00:03:59 +05:30
parent 31138d3f1c
commit b61c8a38b4
5 changed files with 1 additions and 20 deletions

View File

@@ -35,7 +35,6 @@ 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_PROMOTIONAL = "PREFERENCE_PROMOTIONAL"
const val PREFERENCE_SIMILAR = "PREFERENCE_SIMILAR"
const val PREFERENCE_INTRO = "PREFERENCE_INTRO"

View File

@@ -42,7 +42,6 @@ import com.aurora.store.util.Preferences.PREFERENCE_FOR_YOU
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_PROMOTIONAL
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
@@ -173,7 +172,6 @@ class OnboardingActivity : BaseActivity() {
save(PREFERENCE_DEFAULT_SELECTED_TAB, 0)
save(PREFERENCE_QUICK_EXIT, false)
save(PREFERENCE_FOR_YOU, true)
save(PREFERENCE_PROMOTIONAL, true)
save(PREFERENCE_SIMILAR, true)
/*Installer*/

View File

@@ -31,7 +31,6 @@ import com.aurora.store.data.ViewState
import com.aurora.store.data.network.HttpClient
import com.aurora.store.data.providers.AuthProvider
import com.aurora.store.util.Log
import com.aurora.store.util.Preferences
import com.aurora.store.viewmodel.BaseAndroidViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -48,10 +47,6 @@ abstract class BaseClusterViewModel(application: Application) : BaseAndroidViewM
/* Should certainly do it in a better way :(*/
var promotionsAdded: Boolean = false
val showPromotionalApps:Boolean = Preferences.getBoolean(
application,
Preferences.PREFERENCE_PROMOTIONAL
)
lateinit var type: StreamHelper.Type
lateinit var category: StreamHelper.Category
@@ -81,7 +76,7 @@ abstract class BaseClusterViewModel(application: Application) : BaseAndroidViewM
)
//Add promotional cluster
if (!promotionsAdded && showPromotionalApps) {
if (!promotionsAdded) {
val promotionalCluster = promotionalCluster()
newBundle.streamClusters[promotionalCluster.id] = promotionalCluster
promotionsAdded = true