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 | Enhancement | Restoring either last opened space or vault (#1528)

This commit is contained in:
Evgenii Kozlov 2024-09-02 15:04:14 +02:00 committed by GitHub
parent fda05fa782
commit 22d78b0727
Signed by: github
GPG key ID: B5690EEEBB952194
15 changed files with 110 additions and 30 deletions

View file

@ -51,6 +51,12 @@ class DefaultUserSettingsCache(
SpaceId(value)
}
override suspend fun clearCurrentSpace() {
prefs.edit()
.putString(CURRENT_SPACE_KEY, "")
.apply()
}
override suspend fun setDefaultObjectType(space: SpaceId, type: TypeId) {
val curr = prefs
.getString(DEFAULT_OBJECT_TYPES_KEY, NO_VALUE)