mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2916 App | Tech | Prepare staging release (#1666)
Co-authored-by: Konstantin Ivanov <54908981+konstantiniiv@users.noreply.github.com>
This commit is contained in:
parent
14af7b40c1
commit
b78e3e4d0d
203 changed files with 2606 additions and 1726 deletions
|
@ -458,16 +458,13 @@ class DefaultUserSettingsCache(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun getAllContentSort(space: SpaceId): Pair<Id, Boolean> {
|
||||
return context.spacePrefsStore
|
||||
.data
|
||||
.map { preferences ->
|
||||
val pref = preferences.preferences[space.id]?.allContent
|
||||
val sortKey = pref?.sortKey.orEmpty()
|
||||
val isAsc = pref?.isAscending ?: true
|
||||
sortKey to isAsc
|
||||
}
|
||||
.first()
|
||||
override suspend fun getAllContentSort(space: SpaceId): Pair<Id, Boolean>? {
|
||||
val flow = context.spacePrefsStore.data
|
||||
val first = flow.first()
|
||||
val pref = first.preferences[space.id]?.allContent
|
||||
val sortKey = pref?.sortKey ?: return null
|
||||
val isAsc = pref.isAscending ?: true
|
||||
return sortKey to isAsc
|
||||
}
|
||||
|
||||
override suspend fun setAllContentSort(space: SpaceId, sort: Id, isAsc: Boolean) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue