TP-54117 | Opening the app via deeplink always shows no internet experience nudge on top (#9327)
This commit is contained in:
@@ -106,9 +106,9 @@ import com.navi.common.model.UserDetail
|
||||
import com.navi.common.model.common.AppUpdateData
|
||||
import com.navi.common.model.common.NetworkConnectivityNudgeData
|
||||
import com.navi.common.ui.fragment.BaseFragment
|
||||
import com.navi.common.utils.Constants.ADDITIONAL_PARAMETERS
|
||||
import com.navi.common.utils.Constants.BRANCH_BASE_URL
|
||||
import com.navi.common.utils.Constants.CARD_NAME
|
||||
import com.navi.common.utils.Constants.ADDITIONAL_PARAMETERS
|
||||
import com.navi.common.utils.Constants.ERROR_MESSAGE
|
||||
import com.navi.common.utils.Constants.HPC_LOGIN
|
||||
import com.navi.common.utils.Constants.HPC_LOGIN_AP
|
||||
@@ -648,7 +648,7 @@ class NewDashboardActivity :
|
||||
naviAdapter.notifyDataSetChanged()
|
||||
updateProfileLoader(false)
|
||||
}
|
||||
profileVM.hideShimmer.observeNonNull(this){
|
||||
profileVM.hideShimmer.observeNonNull(this) {
|
||||
if (it) {
|
||||
updateProfileLoader(false)
|
||||
}
|
||||
@@ -999,24 +999,28 @@ class NewDashboardActivity :
|
||||
lifecycleScope.launch {
|
||||
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||
homeVM.connectivityObserverHolder.collect {
|
||||
when (it) {
|
||||
ConnectivityObserver.Status.Available -> {
|
||||
fetchHomeItems()
|
||||
updateNetworkConnectivityNudge(
|
||||
networkConnectivityNudgeData = getNudgeDataForInternetConnected()
|
||||
)
|
||||
handleFabButtonPosition()
|
||||
delay(2.seconds)
|
||||
hideNetworkConnectivityNudge()
|
||||
handleFabButtonPosition()
|
||||
}
|
||||
ConnectivityObserver.Status.Unavailable,
|
||||
ConnectivityObserver.Status.Losing,
|
||||
ConnectivityObserver.Status.Lost -> {
|
||||
updateNetworkConnectivityNudge(
|
||||
networkConnectivityNudgeData = getNudgeDataForInternetDisconnected()
|
||||
)
|
||||
handleFabButtonPosition()
|
||||
if (binding.bottomNavigationView.isVisible) {
|
||||
when (it) {
|
||||
ConnectivityObserver.Status.Available -> {
|
||||
fetchHomeItems()
|
||||
updateNetworkConnectivityNudge(
|
||||
networkConnectivityNudgeData =
|
||||
getNudgeDataForInternetConnected()
|
||||
)
|
||||
handleFabButtonPosition()
|
||||
delay(2.seconds)
|
||||
hideNetworkConnectivityNudge()
|
||||
handleFabButtonPosition()
|
||||
}
|
||||
ConnectivityObserver.Status.Unavailable,
|
||||
ConnectivityObserver.Status.Losing,
|
||||
ConnectivityObserver.Status.Lost -> {
|
||||
updateNetworkConnectivityNudge(
|
||||
networkConnectivityNudgeData =
|
||||
getNudgeDataForInternetDisconnected()
|
||||
)
|
||||
handleFabButtonPosition()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1101,7 +1105,7 @@ class NewDashboardActivity :
|
||||
listOf(
|
||||
NaviSpan(
|
||||
startSpan = 0,
|
||||
endSpan = 29,
|
||||
endSpan = 32,
|
||||
fontName = FontWeightEnum.TT_MEDIUM.name,
|
||||
fontSize = 12.0,
|
||||
spanColor = DISCONNECTED_SUBTITLE_COLOR
|
||||
@@ -2781,8 +2785,7 @@ class NewDashboardActivity :
|
||||
}
|
||||
// If branch server is down or any error in branch link
|
||||
if (
|
||||
isUserLoggedIn().not() &&
|
||||
intent.data.toString().startsWith(BRANCH_BASE_URL)
|
||||
isUserLoggedIn().not() && intent.data.toString().startsWith(BRANCH_BASE_URL)
|
||||
) {
|
||||
isDeeplinkAvailable = false
|
||||
redirectToDestination()
|
||||
|
||||
@@ -448,7 +448,7 @@ object Constants {
|
||||
object NetworkConnectivity {
|
||||
const val DISCONNECTED_TITLE_TEXT = "No internet connection"
|
||||
const val DISCONNECTED_TITLE_COLOR = "#191919"
|
||||
const val DISCONNECTED_SUBTITLE_TEXT = "Last updated "
|
||||
const val DISCONNECTED_SUBTITLE_TEXT = "Last updated at "
|
||||
const val DISCONNECTED_SUBTITLE_COLOR = "#444444"
|
||||
const val DISCONNECTED_BACKGROUND_COLOR = "#FFEAEA"
|
||||
const val DISCONNECTED_NUDGE_VIEWED_EVENT = "internet_disconnected_nudge_viewed"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tools:text="Last updated 28 Dec, 11:59 AM" />
|
||||
tools:text="Last updated at 28 Dec, 11:59 AM" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user