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:
parent
9b3644228c
commit
9fb20f0edd
58 changed files with 857 additions and 39 deletions
|
@ -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
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue