Add 'send private read receipts' option in advanced settings (#2290)

* Add 'send private read receipts' option in advanced settings
* Create `SessionPreferencesStore` that stores the settings for the current use separate from those of the app.
* Rename `PreferencesStore` to `AppPreferencesStore` to split the preferences.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2024-01-26 10:06:26 +01:00 committed by GitHub
parent b7945675c9
commit 7e58f719fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 314 additions and 85 deletions

View file

@ -18,7 +18,7 @@ package io.element.android.features.preferences.api.store
import kotlinx.coroutines.flow.Flow
interface PreferencesStore {
interface AppPreferencesStore {
suspend fun setRichTextEditorEnabled(enabled: Boolean)
fun isRichTextEditorEnabledFlow(): Flow<Boolean>

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.api.store
import kotlinx.coroutines.flow.Flow
interface SessionPreferencesStore {
suspend fun setSendPublicReadReceipts(enabled: Boolean)
fun isSendPublicReadReceiptsEnabled(): Flow<Boolean>
suspend fun clear()
}