1
0
Fork 0
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:
Evgenii Kozlov 2024-08-29 12:38:23 +02:00 committed by GitHub
parent b0fc366d7f
commit 6bb9ef1716
Signed by: github
GPG key ID: B5690EEEBB952194
13 changed files with 325 additions and 30 deletions

View file

@ -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()