Restore previous key.
This commit is contained in:
parent
2a1e298359
commit
563746aacb
1 changed files with 2 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import io.element.android.libraries.preferences.api.store.PreferenceDataStoreFac
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
|
|
||||||
|
private val spaceAnnouncementKey = intPreferencesKey("spaceAnnouncement")
|
||||||
private val newNotificationSoundKey = intPreferencesKey("newNotificationSound")
|
private val newNotificationSoundKey = intPreferencesKey("newNotificationSound")
|
||||||
|
|
||||||
@ContributesBinding(AppScope::class)
|
@ContributesBinding(AppScope::class)
|
||||||
|
|
@ -52,6 +53,6 @@ class DefaultAnnouncementStore(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Announcement.toKey() = when (this) {
|
private fun Announcement.toKey() = when (this) {
|
||||||
is Announcement.Fullscreen -> intPreferencesKey("fullscreen_" + this::class.simpleName)
|
Announcement.Fullscreen.Space -> spaceAnnouncementKey
|
||||||
Announcement.NewNotificationSound -> newNotificationSoundKey
|
Announcement.NewNotificationSound -> newNotificationSoundKey
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue