mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
change (media preview config) : clean code
This commit is contained in:
+4
@@ -85,12 +85,14 @@ class DefaultAppPreferencesStore @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Use MediaPreviewService instead. Kept only for migration.")
|
||||
override fun getHideInviteAvatarsFlow(): Flow<Boolean?> {
|
||||
return store.data.map { prefs ->
|
||||
prefs[hideInviteAvatarsKey]
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Use MediaPreviewService instead. Kept only for migration.")
|
||||
override suspend fun setHideInviteAvatars(hide: Boolean?) {
|
||||
store.edit { prefs ->
|
||||
if (hide != null) {
|
||||
@@ -101,6 +103,7 @@ class DefaultAppPreferencesStore @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Use MediaPreviewService instead. Kept only for migration.")
|
||||
override suspend fun setTimelineMediaPreviewValue(mediaPreviewValue: MediaPreviewValue?) {
|
||||
store.edit { prefs ->
|
||||
if (mediaPreviewValue != null) {
|
||||
@@ -111,6 +114,7 @@ class DefaultAppPreferencesStore @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Use MediaPreviewService instead. Kept only for migration.")
|
||||
override fun getTimelineMediaPreviewValueFlow(): Flow<MediaPreviewValue?> {
|
||||
return store.data.map { prefs ->
|
||||
prefs[timelineMediaPreviewValueKey]?.let { MediaPreviewValue.valueOf(it) }
|
||||
|
||||
Reference in New Issue
Block a user