Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Fix critical onboarding black screen bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliyan Germanov committed Nov 16, 2021
1 parent ce021a8 commit 3f1042e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/src/main/java/com/ivy/wallet/ui/IvyViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.ivy.wallet.analytics.IvyAnalytics
import com.ivy.wallet.base.asFlow
import com.ivy.wallet.base.ioThread
import com.ivy.wallet.base.sendToCrashlytics
import com.ivy.wallet.base.uiThread
import com.ivy.wallet.billing.IvyBilling
import com.ivy.wallet.logic.PaywallLogic
import com.ivy.wallet.logic.notification.TransactionReminderLogic
Expand Down Expand Up @@ -64,13 +63,12 @@ class IvyViewModel @Inject constructor(
ivySession.loadFromCache()
ivyAnalytics.loadSession()

appLockEnabled = sharedPrefs.getBoolean(SharedPrefs.APP_LOCK_ENABLED, false)
//initial app locked state
_appLocked.value = appLockEnabled

if (isOnboardingCompleted()) {
appLockEnabled = sharedPrefs.getBoolean(SharedPrefs.APP_LOCK_ENABLED, false)
uiThread {
//initial app locked state
_appLocked.value = appLockEnabled
navigateOnboardedUser(intent)
}
navigateOnboardedUser(intent)
} else {
ivyContext.navigateTo(Screen.Onboarding)
}
Expand Down

0 comments on commit 3f1042e

Please sign in to comment.