Skip to content

Commit 712f650

Browse files
committed
Switch to io before emitting isSignedInStateFlow
1 parent e18ef0f commit 712f650

File tree

1 file changed

+6
-2
lines changed
  • sync/sync-store/src/main/java/com/duckduckgo/sync/store

1 file changed

+6
-2
lines changed

sync/sync-store/src/main/java/com/duckduckgo/sync/store/SyncStore.kt

+6-2
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,16 @@ class SyncSharedPrefsStore(
200200
setPrimaryKey(primaryKey)
201201
setSecretKey(secretKey)
202202

203-
isSignedInStateFlow.emit(true)
203+
withContext(dispatcherProvider.io()) {
204+
isSignedInStateFlow.emit(true)
205+
}
204206
}
205207

206208
override suspend fun clearAll() {
207209
getEncryptedPreferences()?.edit(commit = true) { clear() }
208-
isSignedInStateFlow.emit(false)
210+
withContext(dispatcherProvider.io()) {
211+
isSignedInStateFlow.emit(false)
212+
}
209213
}
210214

211215
companion object {

0 commit comments

Comments
 (0)