mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2731 Vault | Tech | Basic behavior (space creation, space switching) (#1516)
This commit is contained in:
parent
b0fc366d7f
commit
6bb9ef1716
13 changed files with 325 additions and 30 deletions
|
@ -137,6 +137,18 @@ class DefaultUserSettingsCache(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun getWallpapers(): Map<Id, Wallpaper> {
|
||||
val rawSettings = prefs.getString(WALLPAPER_SETTINGS_KEY, "")
|
||||
return if (rawSettings.isNullOrEmpty()) {
|
||||
emptyMap()
|
||||
} else {
|
||||
val deserialized = rawSettings.deserializeWallpaperSettings()
|
||||
return deserialized.mapValues { setting ->
|
||||
setting.value.asWallpaper()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun setThemeMode(mode: ThemeMode) {
|
||||
prefs
|
||||
.edit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue