Fixes #1455 - Use the stable timeline id to match timeline items in between local echo and remote echo states

This commit is contained in:
Stefan Ceriu
2023-08-08 09:41:10 +03:00
committed by Stefan Ceriu
parent 74e0f03356
commit 10259e9345
3 changed files with 14 additions and 8 deletions
@@ -67,3 +67,9 @@ extension Array {
return newItems
}
}
extension Array where Element == RoomTimelineItemProtocol {
func firstUsingStableID(_ id: TimelineItemIdentifier) -> Element? {
first { $0.id.timelineID == id.timelineID }
}
}