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 e22ac6a48d
commit 17f22d143b
38 changed files with 314 additions and 85 deletions

View file

@ -39,7 +39,7 @@ class FakeMatrixTimeline(
private val _paginationState: MutableStateFlow<MatrixTimeline.PaginationState> = MutableStateFlow(initialPaginationState)
private val _timelineItems: MutableStateFlow<List<MatrixTimelineItem>> = MutableStateFlow(initialTimelineItems)
var sendReadReceiptCount = 0
var sentReadReceipts = mutableListOf<Pair<EventId, ReceiptType>>()
private set
var sendReadReceiptLatch: CompletableDeferred<Unit>? = null
@ -81,7 +81,7 @@ class FakeMatrixTimeline(
eventId: EventId,
receiptType: ReceiptType,
): Result<Unit> = simulateLongTask {
sendReadReceiptCount++
sentReadReceipts.add(eventId to receiptType)
sendReadReceiptLatch?.complete(Unit)
Result.success(Unit)
}