TP-67267 | AS |one profile integration with back check (#10948)

This commit is contained in:
Ayushman Sharma
2024-05-21 00:08:54 +05:30
committed by GitHub
parent c007533277
commit e3322539ea
2 changed files with 9 additions and 1 deletions

View File

@@ -77,6 +77,8 @@ import com.navi.coin.utils.analytics.NaviCoinsAnalytics
import com.navi.coin.utils.analytics.NaviCoinsAnalytics.Companion.REWARDS_NAVI_COINS_INFO_PAGE_BACK_ARROW_CLICK
import com.navi.coin.utils.constant.Constants
import com.navi.coin.utils.constant.Constants.BACKGROUND_IMAGE_HEIGHT_KEY
import com.navi.coin.utils.constant.Constants.CoinHomeScreen.BACK_FROM
import com.navi.coin.utils.constant.Constants.CoinHomeScreen.ONE_PROFILE_SCREEN
import com.navi.coin.utils.constant.Constants.CoinHomeScreen.OPEN_APP_SETTINGS
import com.navi.coin.utils.constant.Constants.CoinHomeScreen.TRIGGER_REDEMPTION_ACTION
import com.navi.coin.utils.constant.Constants.CoinHomeScreen.TRIGGER_REDEMPTION_EVENT
@@ -147,6 +149,8 @@ fun CoinHomeScreen(
NaviLocationManager()
}
fun shouldRefreshScreen() = (coinHomeScreenVM.handle.get<String>(BACK_FROM) == ONE_PROFILE_SCREEN).not()
fun renderBottomSheet(bottomSheetId: String?) {
scope.launch(Dispatchers.IO) {
bottomSheetId?.let {
@@ -240,7 +244,9 @@ fun CoinHomeScreen(
val observer = LifecycleEventObserver { _, event ->
when (event) {
Lifecycle.Event.ON_START -> {
coinHomeScreenVM.fetchCoinHomeScreenUiTronConfigs()
if(shouldRefreshScreen()){
coinHomeScreenVM.fetchCoinHomeScreenUiTronConfigs()
}
}
else -> Unit
}

View File

@@ -71,6 +71,8 @@ object Constants {
const val TRIGGER_REDEMPTION_EVENT = "trigger_redemption"
const val TRIGGER_REDEMPTION_ACTION = "trigger_redemption_action"
const val ONE_PROFILE_VERIFICATION_REQUEST_CODE = 1001
const val ONE_PROFILE_SCREEN = "ONE_PROFILE_SCREEN"
const val BACK_FROM = "back_from"
}
const val CLOSE = "close"