change (media preview config) : final refactoring and tests

This commit is contained in:
ganfra 2025-06-30 21:31:58 +02:00
parent cbc10ad50e
commit 4734b560f7
27 changed files with 676 additions and 165 deletions

View file

@ -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.")
}
}