mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Send all receipts through the active timeline and remove unecessary making of a room as read (already handled)
This commit is contained in:
committed by
Stefan Ceriu
parent
52cdd29fe1
commit
d32be1f728
@@ -124,17 +124,12 @@ class TimelineController: TimelineControllerProtocol {
|
|||||||
func sendReadReceipt(for itemID: TimelineItemIdentifier) async {
|
func sendReadReceipt(for itemID: TimelineItemIdentifier) async {
|
||||||
let receiptType: MatrixRustSDK.ReceiptType = appSettings.sharePresence ? .read : .readPrivate
|
let receiptType: MatrixRustSDK.ReceiptType = appSettings.sharePresence ? .read : .readPrivate
|
||||||
|
|
||||||
// Mark the whole room as read if it's the last timeline item
|
|
||||||
if timelineItems.last?.id == itemID {
|
|
||||||
_ = await roomProxy.markAsRead(receiptType: receiptType)
|
|
||||||
} else {
|
|
||||||
guard let eventID = itemID.eventID else {
|
guard let eventID = itemID.eventID else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = await activeTimeline.sendReadReceipt(for: eventID, type: receiptType)
|
_ = await activeTimeline.sendReadReceipt(for: eventID, type: receiptType)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func processItemAppearance(_ itemID: TimelineItemIdentifier) async {
|
func processItemAppearance(_ itemID: TimelineItemIdentifier) async {
|
||||||
guard let timelineItem = timelineItems.firstUsingStableID(itemID) else {
|
guard let timelineItem = timelineItems.firstUsingStableID(itemID) else {
|
||||||
|
|||||||
Reference in New Issue
Block a user