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

DROID-3210 Space-level chats | Enhancement | Save recently used chat reactions and display it in the dedicated section of the reaction picker (#1967)

This commit is contained in:
Evgenii Kozlov 2025-01-04 07:12:08 +01:00 committed by GitHub
parent f38f3fd8d6
commit 5edb38a440
Signed by: github
GPG key ID: B5690EEEBB952194
12 changed files with 183 additions and 16 deletions

View file

@ -49,4 +49,7 @@ interface UserSettingsCache {
suspend fun setRelativeDates(account: Account, enabled: Boolean)
suspend fun setDateFormat(account: Account, format: String)
suspend fun setRecentlyUsedChatReactions(account: Account, emojis: Set<String>)
fun observeRecentlyUsedChatReactions(account: Account): Flow<List<String>>
}

View file

@ -131,4 +131,12 @@ class UserSettingsDataRepository(private val cache: UserSettingsCache) : UserSet
) {
cache.setDateFormat(account, format)
}
override suspend fun setRecentlyUsedChatReactions(account: Account, emojis: Set<String>) {
cache.setRecentlyUsedChatReactions(account, emojis)
}
override fun observeRecentlyUsedChatReactions(account: Account,): Flow<List<String>> {
return cache.observeRecentlyUsedChatReactions(account)
}
}