mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +00:00
Fix glitches when loading the timeline: use locally generated stable identifiers for all possible timeline items
This commit is contained in:
committed by
Stefan Ceriu
parent
2146c71232
commit
ffa2644ed8
+1
-1
@@ -17,5 +17,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct PaginationIndicatorRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
struct PaginationIndicatorRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
||||||
let id: String = UUID().uuidString
|
let id = "paginationIndicatorTimelineItemIdentifier"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -17,5 +17,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct ReadMarkerRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
struct ReadMarkerRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
||||||
let id: String = UUID().uuidString
|
let id = "readMarkerTimelineItemIdentifier"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -17,6 +17,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct SeparatorRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
struct SeparatorRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
||||||
|
#warning("This should really be a stable identifier, ideally coming from the SDK, but unfortunately we receive duplicates for it at the moment, crashing our timeline data source")
|
||||||
let id: String = UUID().uuidString
|
let id: String = UUID().uuidString
|
||||||
let text: String
|
let text: String
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -17,6 +17,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct TimelineStartRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
struct TimelineStartRoomTimelineItem: DecorationTimelineItemProtocol, Identifiable, Hashable {
|
||||||
let id: String = UUID().uuidString
|
let id = "timelineStartTimelineItemIdentifier"
|
||||||
let name: String?
|
let name: String?
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user