mirror of
https://github.com/bitwarden/android.git
synced 2026-05-26 22:37:18 -05:00
Modified the isIconLoadingDisabled setting to be a flow (#626)
This commit is contained in:
@@ -22,14 +22,29 @@ class FakeSettingsDiskSource : SettingsDiskSource {
|
||||
private val mutablePullToRefreshEnabledFlowMap =
|
||||
mutableMapOf<String, MutableSharedFlow<Boolean?>>()
|
||||
|
||||
private val mutableIsIconLoadingDisabled =
|
||||
bufferedMutableSharedFlow<Boolean?>()
|
||||
|
||||
private val storedVaultTimeoutActions = mutableMapOf<String, VaultTimeoutAction?>()
|
||||
private val storedVaultTimeoutInMinutes = mutableMapOf<String, Int?>()
|
||||
|
||||
private val storedPullToRefreshEnabled = mutableMapOf<String, Boolean?>()
|
||||
|
||||
private var storedIsIconLoadingDisabled: Boolean? = null
|
||||
|
||||
override var appLanguage: AppLanguage? = null
|
||||
|
||||
override var isIconLoadingDisabled: Boolean? = null
|
||||
override var isIconLoadingDisabled: Boolean?
|
||||
get() = storedIsIconLoadingDisabled
|
||||
set(value) {
|
||||
storedIsIconLoadingDisabled = value
|
||||
mutableIsIconLoadingDisabled.tryEmit(value)
|
||||
}
|
||||
|
||||
override val isIconLoadingDisabledFlow: Flow<Boolean?>
|
||||
get() = mutableIsIconLoadingDisabled.onSubscription {
|
||||
emit(isIconLoadingDisabled)
|
||||
}
|
||||
|
||||
override fun clearData(userId: String) {
|
||||
storedVaultTimeoutActions.remove(userId)
|
||||
|
||||
Reference in New Issue
Block a user