1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

App | Feature | Wallpaper (#1995)

This commit is contained in:
Evgenii Kozlov 2021-12-08 11:24:13 +03:00 committed by GitHub
parent 9b3644228c
commit 9fb20f0edd
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 857 additions and 39 deletions

View file

@ -1,6 +1,10 @@
package com.anytypeio.anytype.data.auth.repo
import com.anytypeio.anytype.core_models.Wallpaper
interface UserSettingsCache {
suspend fun setDefaultObjectType(type: String, name: String)
suspend fun getDefaultObjectType(): Pair<String?, String?>
suspend fun setWallpaper(wallpaper: Wallpaper)
suspend fun getWallpaper() : Wallpaper
}

View file

@ -1,9 +1,16 @@
package com.anytypeio.anytype.data.auth.repo
import com.anytypeio.anytype.core_models.Wallpaper
import com.anytypeio.anytype.domain.config.UserSettingsRepository
class UserSettingsDataRepository(private val cache: UserSettingsCache) : UserSettingsRepository {
override suspend fun setWallpaper(wallpaper: Wallpaper) {
cache.setWallpaper(wallpaper)
}
override suspend fun getWallpaper(): Wallpaper = cache.getWallpaper()
override suspend fun setDefaultObjectType(type: String, name: String) {
cache.setDefaultObjectType(type, name)
}