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

@ -23,6 +23,7 @@ interface UserSettingsCache {
suspend fun setWallpaper(space: Id, wallpaper: Wallpaper)
suspend fun getWallpaper(space: Id) : Wallpaper
suspend fun getWallpapers(): Map<Id, Wallpaper>
suspend fun setThemeMode(mode: ThemeMode)
suspend fun getThemeMode(): ThemeMode
suspend fun getWidgetSession() : WidgetSession

View file

@ -17,6 +17,10 @@ class UserSettingsDataRepository(private val cache: UserSettingsCache) : UserSet
override suspend fun getWallpaper(space: Id): Wallpaper = cache.getWallpaper(space)
override suspend fun getWallpapers(): Map<Id, Wallpaper> {
return cache.getWallpapers()
}
override suspend fun setDefaultObjectType(
space: SpaceId,
type: TypeId