change (media preview config) : final refactoring and tests
This commit is contained in:
parent
cbc10ad50e
commit
4734b560f7
27 changed files with 676 additions and 165 deletions
|
|
@ -26,6 +26,7 @@ class MediaPreviewConfigMigration @Inject constructor(
|
|||
@SessionCoroutineScope
|
||||
private val sessionCoroutineScope: CoroutineScope,
|
||||
) {
|
||||
@Suppress("DEPRECATION")
|
||||
operator fun invoke() = sessionCoroutineScope.launch {
|
||||
val hideInviteAvatars = appPreferencesStore.getHideInviteAvatarsFlow().first()
|
||||
val mediaPreviewValue = appPreferencesStore.getTimelineMediaPreviewValueFlow().first()
|
||||
|
|
@ -49,7 +50,8 @@ class MediaPreviewConfigMigration @Inject constructor(
|
|||
appPreferencesStore.setTimelineMediaPreviewValue(null)
|
||||
}
|
||||
}
|
||||
}.onFailure {
|
||||
}
|
||||
.onFailure {
|
||||
Timber.d("Couldn't perform migration, failed to fetch media preview config.")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue