mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2734 Global search | Save last search phrase (#1518)
This commit is contained in:
parent
6bb9ef1716
commit
fdbdc20f21
35 changed files with 403 additions and 76 deletions
|
@ -21,6 +21,10 @@ interface UserSettingsCache {
|
|||
suspend fun getLastOpenedObject(space: SpaceId) : Id?
|
||||
suspend fun clearLastOpenedObject(space: SpaceId)
|
||||
|
||||
suspend fun setLastSearchQuery(query: String, space: SpaceId)
|
||||
suspend fun getLastSearchQuery(space: SpaceId): String
|
||||
suspend fun clearLastSearchQuery(space: SpaceId)
|
||||
|
||||
suspend fun setWallpaper(space: Id, wallpaper: Wallpaper)
|
||||
suspend fun getWallpaper(space: Id) : Wallpaper
|
||||
suspend fun getWallpapers(): Map<Id, Wallpaper>
|
||||
|
|
|
@ -73,4 +73,16 @@ class UserSettingsDataRepository(private val cache: UserSettingsCache) : UserSet
|
|||
override suspend fun clearLastOpenedObject(space: SpaceId) {
|
||||
cache.clearLastOpenedObject(space)
|
||||
}
|
||||
|
||||
override suspend fun setLastSearchQuery(query: String, space: SpaceId) {
|
||||
cache.setLastSearchQuery(query, space)
|
||||
}
|
||||
|
||||
override suspend fun getLastSearchQuery(space: SpaceId): String {
|
||||
return cache.getLastSearchQuery(space)
|
||||
}
|
||||
|
||||
override suspend fun clearLastSearchQuery(space: SpaceId) {
|
||||
cache.clearLastSearchQuery(space)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue