Skip to content

Commit

Permalink
Merge branch 'welcome-screen-is-shown-after-app-restart-droid-499'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Nov 22, 2023
2 parents e98cece + 657f1c3 commit c13ec3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AccountRepository(
messageHandler.trySendRequest(Request.ClearAccountHistory)
}

private fun clearCreatedAccountCache() {
fun clearCreatedAccountCache() {
_cachedCreatedAccount.value = null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ class ConnectViewModel(
.debounce(UI_STATE_DEBOUNCE_DURATION_MILLIS)
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), ConnectUiState.INITIAL)

init {
// The create account cache is no longer needed as we have successfully reached the connect
// screen
accountRepository.clearCreatedAccountCache()
}

private fun LocationInfoCache.locationCallbackFlow() = callbackFlow {
onNewLocation = { this.trySend(it) }
awaitClose { onNewLocation = null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ConnectViewModelTest {
private val mockLocation: GeoIpLocation = mockk(relaxed = true)

// Account Repository
private val mockAccountRepository: AccountRepository = mockk()
private val mockAccountRepository: AccountRepository = mockk(relaxed = true)

// Device Repository
private val mockDeviceRepository: DeviceRepository = mockk()
Expand Down

0 comments on commit c13ec3c

Please sign in to comment.