NTP-47167 | Add HP_PROFILE_FETCH_DISABLED and HP_IAN_FETCH_DISABLED firebase remote config keys (#15391)
This commit is contained in:
@@ -53,6 +53,8 @@ import com.navi.base.utils.orTrue
|
||||
import com.navi.base.utils.orZero
|
||||
import com.navi.common.constants.APP_UPGRADE_DATA
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.HP_IAN_FETCH_DISABLED
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.HP_PROFILE_FETCH_DISABLED
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.RESOURCE_MANAGER_ENABLED
|
||||
import com.navi.common.handler.CollectRequestPopupEventHandler
|
||||
import com.navi.common.managers.PermissionsManager
|
||||
@@ -437,8 +439,10 @@ class HomePageActivity :
|
||||
super.onResume()
|
||||
handleStatusBarColor()
|
||||
if (BaseUtils.isUserLoggedIn()) {
|
||||
notificationVM.fetchNotificationsItems(true, naeScreenName = screenName)
|
||||
fetchProfileItems()
|
||||
fetchNotificationItems()
|
||||
fetchProfileItems(
|
||||
fetchDataDisabled = FirebaseRemoteConfigHelper.getBoolean(HP_PROFILE_FETCH_DISABLED)
|
||||
)
|
||||
fetchScreenOverlayData()
|
||||
}
|
||||
TempStorageHelper.clear()
|
||||
@@ -833,19 +837,31 @@ class HomePageActivity :
|
||||
}
|
||||
}
|
||||
|
||||
internal fun fetchProfileItems(isProfileDrawerOpen: Boolean = false) {
|
||||
private fun fetchNotificationItems() {
|
||||
if (FirebaseRemoteConfigHelper.getBoolean(HP_IAN_FETCH_DISABLED).not()) {
|
||||
notificationVM.fetchNotificationsItems(true, naeScreenName = screenName)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun fetchProfileItems(
|
||||
isProfileDrawerOpen: Boolean = false,
|
||||
fetchDataDisabled: Boolean = false,
|
||||
) {
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
profileVM.fetchProfileItems(
|
||||
isScreenLockEnabled =
|
||||
FirebaseRemoteConfigHelper.getBoolean(IS_SCREEN_LOCK_ENABLED) &&
|
||||
PreferenceManager.getStringPreference(HPC_SCREEN_LOCK_EXPERIMENT) ==
|
||||
ENABLED,
|
||||
isMobileScreenLockSet =
|
||||
biometricPromptUtils.isDeviceSecure(this@HomePageActivity) &&
|
||||
PreferenceManager.getStringPreference(IS_SCREEN_LOCK_ENABLED) != DISABLED,
|
||||
naeScreenName = screenName,
|
||||
isProfileDrawerOpen = isProfileDrawerOpen,
|
||||
)
|
||||
if (fetchDataDisabled.not()) {
|
||||
profileVM.fetchProfileItems(
|
||||
isScreenLockEnabled =
|
||||
FirebaseRemoteConfigHelper.getBoolean(IS_SCREEN_LOCK_ENABLED) &&
|
||||
PreferenceManager.getStringPreference(HPC_SCREEN_LOCK_EXPERIMENT) ==
|
||||
ENABLED,
|
||||
isMobileScreenLockSet =
|
||||
biometricPromptUtils.isDeviceSecure(this@HomePageActivity) &&
|
||||
PreferenceManager.getStringPreference(IS_SCREEN_LOCK_ENABLED) !=
|
||||
DISABLED,
|
||||
naeScreenName = screenName,
|
||||
isProfileDrawerOpen = isProfileDrawerOpen,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -280,6 +280,9 @@ object FirebaseRemoteConfigHelper {
|
||||
const val MM_FONT_SCALE_MAX_LIMIT = "MM_FONT_SCALE_MAX_LIMIT"
|
||||
const val MM_SPEND_GOALS_ENABLED = "MM_SPEND_GOALS_ENABLED"
|
||||
|
||||
const val HP_PROFILE_FETCH_DISABLED = "HP_PROFILE_FETCH_DISABLED"
|
||||
const val HP_IAN_FETCH_DISABLED = "HP_IAN_FETCH_DISABLED"
|
||||
|
||||
// FESTIVE THEME
|
||||
const val FESTIVE_RESOURCE_URL_LIST = "FESTIVE_RESOURCE_URL_LIST"
|
||||
|
||||
|
||||
@@ -673,4 +673,12 @@
|
||||
<key>MM_SPEND_GOALS_ENABLED</key>
|
||||
<value>false</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>HP_PROFILE_FETCH_DISABLED</key>
|
||||
<value>false</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>HP_IAN_FETCH_DISABLED</key>
|
||||
<value>false</value>
|
||||
</entry>
|
||||
</defaultsMap>
|
||||
Reference in New Issue
Block a user