Revert "Reduced room summary provider logging"
This reverts commit 45ebe1724b.
This commit is contained in:
@@ -240,7 +240,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
return
|
||||
}
|
||||
|
||||
MXLog.verbose("Updating rooms")
|
||||
MXLog.info("Updating rooms")
|
||||
|
||||
var rooms = [HomeScreenRoom]()
|
||||
|
||||
@@ -259,7 +259,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
|
||||
state.rooms = rooms
|
||||
|
||||
MXLog.verbose("Finished updating rooms")
|
||||
MXLog.info("Finished updating rooms")
|
||||
}
|
||||
|
||||
private func buildRoom(with details: RoomSummaryDetails, invalidated: Bool) -> HomeScreenRoom {
|
||||
|
||||
@@ -69,7 +69,7 @@ class MessageForwardingScreenViewModel: MessageForwardingScreenViewModelType, Me
|
||||
return
|
||||
}
|
||||
|
||||
MXLog.verbose("Updating rooms")
|
||||
MXLog.info("Updating rooms")
|
||||
|
||||
var rooms = [MessageForwardingRoom]()
|
||||
|
||||
@@ -89,6 +89,6 @@ class MessageForwardingScreenViewModel: MessageForwardingScreenViewModelType, Me
|
||||
|
||||
state.rooms = rooms
|
||||
|
||||
MXLog.verbose("Finished updating rooms")
|
||||
MXLog.info("Finished updating rooms")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
do {
|
||||
listUpdatesSubscriptionResult = roomList.entriesWithDynamicFilter(listener: RoomListEntriesListenerProxy { [weak self] updates in
|
||||
guard let self else { return }
|
||||
MXLog.verbose("\(name): Received list update")
|
||||
MXLog.info("\(name): Received list update")
|
||||
diffsPublisher.send(updates)
|
||||
})
|
||||
|
||||
@@ -131,7 +131,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
span.exit()
|
||||
}
|
||||
|
||||
MXLog.verbose("\(name): Received \(diffs.count) diffs, current room list \(rooms.compactMap { $0.id ?? "Empty" })")
|
||||
MXLog.info("\(name): Received \(diffs.count) diffs, current room list \(rooms.compactMap { $0.id ?? "Empty" })")
|
||||
|
||||
for diff in diffs {
|
||||
// Special case resets in order to prevent large updates from blocking the UI
|
||||
@@ -147,7 +147,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
|
||||
detectDuplicatesInRoomList(rooms)
|
||||
|
||||
MXLog.verbose("\(name): Finished applying \(diffs.count) diffs, new room list \(rooms.compactMap { $0.id ?? "Empty" })")
|
||||
MXLog.info("\(name): Finished applying \(diffs.count) diffs, new room list \(rooms.compactMap { $0.id ?? "Empty" })")
|
||||
}
|
||||
|
||||
private func processDiff(_ diff: RoomListEntriesUpdate) {
|
||||
@@ -248,36 +248,36 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
|
||||
switch diff {
|
||||
case .pushFront(let value):
|
||||
MXLog.verbose("\(name): Push Front \(value.debugIdentifier)")
|
||||
MXLog.info("\(name): Push Front \(value.debugIdentifier)")
|
||||
let summary = buildSummaryForRoomListEntry(value)
|
||||
changes.append(.insert(offset: 0, element: summary, associatedWith: nil))
|
||||
case .pushBack(let value):
|
||||
MXLog.verbose("\(name): Push Back \(value.debugIdentifier)")
|
||||
MXLog.info("\(name): Push Back \(value.debugIdentifier)")
|
||||
let summary = buildSummaryForRoomListEntry(value)
|
||||
changes.append(.insert(offset: rooms.count, element: summary, associatedWith: nil))
|
||||
case .append(values: let values):
|
||||
let debugIdentifiers = values.map(\.debugIdentifier)
|
||||
MXLog.verbose("\(name): Append \(debugIdentifiers)")
|
||||
MXLog.info("\(name): Append \(debugIdentifiers)")
|
||||
for (index, value) in values.enumerated() {
|
||||
let summary = buildSummaryForRoomListEntry(value)
|
||||
changes.append(.insert(offset: rooms.count + index, element: summary, associatedWith: nil))
|
||||
}
|
||||
case .set(let index, let value):
|
||||
MXLog.verbose("\(name): Update \(value.debugIdentifier) at \(index)")
|
||||
MXLog.info("\(name): Update \(value.debugIdentifier) at \(index)")
|
||||
let summary = buildSummaryForRoomListEntry(value)
|
||||
changes.append(.remove(offset: Int(index), element: summary, associatedWith: nil))
|
||||
changes.append(.insert(offset: Int(index), element: summary, associatedWith: nil))
|
||||
case .insert(let index, let value):
|
||||
MXLog.verbose("\(name): Insert at \(value.debugIdentifier) at \(index)")
|
||||
MXLog.info("\(name): Insert at \(value.debugIdentifier) at \(index)")
|
||||
let summary = buildSummaryForRoomListEntry(value)
|
||||
changes.append(.insert(offset: Int(index), element: summary, associatedWith: nil))
|
||||
case .remove(let index):
|
||||
let summary = rooms[Int(index)]
|
||||
MXLog.verbose("\(name): Remove \(summary.id ?? "") from \(index)")
|
||||
MXLog.info("\(name): Remove \(summary.id ?? "") from \(index)")
|
||||
changes.append(.remove(offset: Int(index), element: summary, associatedWith: nil))
|
||||
case .reset(let values):
|
||||
let debugIdentifiers = values.map(\.debugIdentifier)
|
||||
MXLog.verbose("\(name): Replace all items with \(debugIdentifiers)")
|
||||
MXLog.info("\(name): Replace all items with \(debugIdentifiers)")
|
||||
for (index, summary) in rooms.enumerated() {
|
||||
changes.append(.remove(offset: index, element: summary, associatedWith: nil))
|
||||
}
|
||||
@@ -286,16 +286,16 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
changes.append(.insert(offset: index, element: buildSummaryForRoomListEntry(value), associatedWith: nil))
|
||||
}
|
||||
case .clear:
|
||||
MXLog.verbose("\(name): Clear all items")
|
||||
MXLog.info("\(name): Clear all items")
|
||||
for (index, value) in rooms.enumerated() {
|
||||
changes.append(.remove(offset: index, element: value, associatedWith: nil))
|
||||
}
|
||||
case .popFront:
|
||||
MXLog.verbose("\(name): Pop Front")
|
||||
MXLog.info("\(name): Pop Front")
|
||||
let summary = rooms[0]
|
||||
changes.append(.remove(offset: 0, element: summary, associatedWith: nil))
|
||||
case .popBack:
|
||||
MXLog.verbose("\(name): Pop Back")
|
||||
MXLog.info("\(name): Pop Back")
|
||||
guard let value = rooms.last else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user