NTP-66960 | Naman Khurmi | Added safe launch and default null value. (#16589)
This commit is contained in:
@@ -33,6 +33,7 @@ import com.navi.common.utils.deviceId
|
||||
import com.navi.common.utils.getAppsflyerUid
|
||||
import com.navi.common.utils.isValidResponse
|
||||
import com.navi.common.utils.log
|
||||
import com.navi.common.utils.safeLaunch
|
||||
import com.naviapp.app.NaviApplication
|
||||
import com.naviapp.common.repository.ConfigRepository
|
||||
import com.naviapp.launcher.helper.GuardDogSdkInitializer
|
||||
@@ -154,7 +155,7 @@ constructor(
|
||||
}
|
||||
|
||||
fun fetchLoginSettings(naeScreenName: String) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
viewModelScope.safeLaunch(Dispatchers.IO) {
|
||||
val response = registerRepository.fetchLoginSettings(naeScreenName = naeScreenName)
|
||||
if (response.error == null) {
|
||||
_loginSettings.postValue(response.data)
|
||||
|
||||
@@ -41,7 +41,7 @@ class ConfigVM @Inject constructor() : BaseVM(isExceptionNeedToShow = false) {
|
||||
get() = _loginSettings
|
||||
|
||||
fun fetchLoginSettings(naeScreenName: String) {
|
||||
coroutineScope.launch(Dispatchers.IO) {
|
||||
viewModelScope.safeLaunch(Dispatchers.IO) {
|
||||
val response = registerRepository.fetchLoginSettings(naeScreenName = naeScreenName)
|
||||
if (response.error == null) {
|
||||
_loginSettings.postValue(response.data)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2019-2023 by Navi Technologies Limited
|
||||
* * Copyright © 2019-2025 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
@@ -15,7 +15,7 @@ import kotlinx.parcelize.Parcelize
|
||||
data class AppUpgradeResponse(
|
||||
@SerializedName("softUpgrade") val softUpgrade: Boolean?,
|
||||
@SerializedName("hardUpgrade") val hardUpgrade: Boolean?,
|
||||
@SerializedName("expectedAppVersionCode") val expectedAppVersionCode: Int?,
|
||||
@SerializedName("expectedAppVersionCode") val expectedAppVersionCode: Int? = null,
|
||||
@SerializedName("downloadableUrl") val downloadableUrl: String? = null,
|
||||
@SerializedName("verificationHash") val verificationHash: String? = null,
|
||||
@SerializedName("updateType") val updateType: String? = null,
|
||||
|
||||
Reference in New Issue
Block a user