mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2731 Vault | Enhancement | Restoring either last opened space or vault (#1528)
This commit is contained in:
parent
fda05fa782
commit
22d78b0727
15 changed files with 110 additions and 30 deletions
|
@ -11,6 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
|||
interface UserSettingsCache {
|
||||
suspend fun setCurrentSpace(space: SpaceId)
|
||||
suspend fun getCurrentSpace(): SpaceId?
|
||||
suspend fun clearCurrentSpace()
|
||||
|
||||
suspend fun setDefaultObjectType(space: SpaceId, type: TypeId)
|
||||
suspend fun getDefaultObjectType(space: SpaceId): TypeId?
|
||||
|
|
|
@ -62,6 +62,8 @@ class UserSettingsDataRepository(private val cache: UserSettingsCache) : UserSet
|
|||
|
||||
override suspend fun getCurrentSpace(): SpaceId? = cache.getCurrentSpace()
|
||||
|
||||
override suspend fun clearCurrentSpace() = cache.clearCurrentSpace()
|
||||
|
||||
override suspend fun setLastOpenedObject(id: Id, space: SpaceId) {
|
||||
cache.setLastOpenedObject(id, space)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue