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

App| Feature | User settings screen, default object type (#1856)

* user settings, domain + data

* legacy

* user settings screen

* profile screen update with user vsettings

* navigation to user settings screen

* add context

* footer fix

* user settings screen

* user settings di

* add user settings logic to main screen

* remove logic from main screen

* add object type logic to splash screen

* pr fix

* fix

* ci

* fix

* ci off

* fix tests

* fix
This commit is contained in:
Konstantin Ivanov 2021-10-20 19:12:03 +03:00 committed by GitHub
parent b887c6f9ed
commit 4cb8bc6e85
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 892 additions and 166 deletions

View file

@ -0,0 +1,19 @@
package com.anytypeio.anytype.persistence.repo
import android.content.SharedPreferences
import com.anytypeio.anytype.data.auth.repo.UserSettingsCache
class DefaultUserSettingsCache(private val prefs: SharedPreferences) : UserSettingsCache {
override suspend fun setDefaultPageType(type: String) {
prefs.edit().putString(DEFAULT_PAGE_KEY, type).apply()
}
override suspend fun getDefaultPageType(): String? {
return prefs.getString(DEFAULT_PAGE_KEY, null)
}
companion object {
const val DEFAULT_PAGE_KEY = "prefs.user_settings.default_page"
}
}