mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove the createSpan method entirely
As it's easier to live without it than to deal with the API redesign or or misuse panics.
This commit is contained in:
@@ -251,15 +251,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
return currentItems
|
||||
}
|
||||
|
||||
// The span guard is thread local, so it must not straddle a suspension
|
||||
// point, otherwise the task could resume on a different thread and
|
||||
// unbalance it, causing a panic and subsequent (intentional) crash.
|
||||
let span = MXLog.createSpan("\(name).apply_room_list_diff")
|
||||
span.enter()
|
||||
defer {
|
||||
span.exit()
|
||||
}
|
||||
|
||||
guard let updatedItems = currentItems.applying(collectionDiff) else {
|
||||
MXLog.error("\(name): Failed applying diff: \(collectionDiff)")
|
||||
return currentItems
|
||||
|
||||
@@ -99,12 +99,6 @@ class TimelineItemProvider: TimelineItemProviderProtocol {
|
||||
private static func processDiffs(_ diffs: [TimelineDiff],
|
||||
on currentItems: [TimelineItemProxy],
|
||||
spanName: String) async -> (itemProxies: [TimelineItemProxy], hasMembershipChange: Bool) {
|
||||
let span = MXLog.createSpan(spanName)
|
||||
span.enter()
|
||||
defer {
|
||||
span.exit()
|
||||
}
|
||||
|
||||
var hasMembershipChange = false
|
||||
|
||||
let itemProxies = diffs.reduce(currentItems) { currentItems, diff in
|
||||
|
||||
Reference in New Issue
Block a user