diff --git a/app/src/main/java/com/tari/android/wallet/data/sharedPrefs/SharedPrefsRepository.kt b/app/src/main/java/com/tari/android/wallet/data/sharedPrefs/SharedPrefsRepository.kt index bf979e805..d10e91f3e 100644 --- a/app/src/main/java/com/tari/android/wallet/data/sharedPrefs/SharedPrefsRepository.kt +++ b/app/src/main/java/com/tari/android/wallet/data/sharedPrefs/SharedPrefsRepository.kt @@ -106,7 +106,7 @@ class SharedPrefsRepository @Inject constructor( var actionMenuSide: Boolean by SharedPrefBooleanDelegate(sharedPrefs, this, formatKey(Key.actionMenuSide)) val onboardingAuthWasInterrupted: Boolean - get() = onboardingAuthSetupStarted && !onboardingAuthSetupCompleted + get() = onboardingAuthSetupStarted && (!onboardingAuthSetupCompleted || securityPrefRepository.pinCode != null) val onboardingWasInterrupted: Boolean get() = onboardingStarted && !onboardingCompleted diff --git a/app/src/main/java/com/tari/android/wallet/ui/fragment/splash/SplashActivity.kt b/app/src/main/java/com/tari/android/wallet/ui/fragment/splash/SplashActivity.kt index 102830973..d3b3e8e3b 100644 --- a/app/src/main/java/com/tari/android/wallet/ui/fragment/splash/SplashActivity.kt +++ b/app/src/main/java/com/tari/android/wallet/ui/fragment/splash/SplashActivity.kt @@ -38,6 +38,7 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.tari.android.wallet.data.WalletConfig import com.tari.android.wallet.data.sharedPrefs.SharedPrefsRepository +import com.tari.android.wallet.data.sharedPrefs.security.SecurityPrefRepository import com.tari.android.wallet.di.DiContainer.appComponent import com.tari.android.wallet.service.service.WalletServiceLauncher import com.tari.android.wallet.ui.fragment.auth.AuthActivity @@ -58,6 +59,9 @@ class SplashActivity : AppCompatActivity() { @Inject lateinit var sharedPrefsRepository: SharedPrefsRepository + @Inject + lateinit var securityPrefRepository: SecurityPrefRepository + @Inject lateinit var walletServiceLauncher: WalletServiceLauncher @@ -75,6 +79,10 @@ class SplashActivity : AppCompatActivity() { WalletUtil.clearWalletFiles(walletConfig.getWalletFilesDirPath()) sharedPrefsRepository.clear() } + if (securityPrefRepository.pinCode == null) { + launch(OnboardingFlowActivity::class.java) + return + } launch(if (exists) AuthActivity::class.java else OnboardingFlowActivity::class.java) } diff --git a/build.gradle b/build.gradle index 6e9efc26e..4e5b826d9 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { ext.lifecycle_version = '2.6.2' // build & version - ext.buildNumber = 259 + ext.buildNumber = 260 ext.versionNumber = "0.24.0" // JNI libs