Adopt new timeline item debug info and overhaul the timeline item deb… (#781)

* Adopt new timeline item debug info and overhaul the timeline item debug menu
This commit is contained in:
Stefan Ceriu
2023-04-19 18:07:51 +03:00
committed by GitHub
parent df2784114a
commit 59a4e0ac7c
7 changed files with 117 additions and 46 deletions
@@ -181,21 +181,19 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
// Handle this parallel to the timeline items so we're not forced
// to bundle the Rust side objects within them
func debugDescription(for itemID: String) -> String {
var description = "Unknown item"
timelineProvider.itemsPublisher.value.forEach { timelineItemProxy in
func debugInfo(for itemID: String) -> TimelineItemDebugInfo {
for timelineItemProxy in timelineProvider.itemsPublisher.value {
switch timelineItemProxy {
case .event(let item):
if item.id == itemID {
description = item.debugDescription
return
return item.debugInfo
}
default:
break
continue
}
}
return description
return .init(model: "Unknown item", originalJSON: nil, latestEditJSON: nil)
}
func retryDecryption(for sessionID: String) async {