Add retry decryption encrypted timeline item debug menu option (#384)

* Fixed a couple of warnings (+2 squashed commits)
Squashed commits:
[21fbc3b0] Add changelog
[abb092c6] Add retry decryption encrypted timeline item debug menu option

* Cleanup room list state computations

* Bump the RustSDK to v1.0.25-alpha

* Fix brew CI errors: remove imagemagick and brew lock file entirely

* Fix release script version bumping

* Bump ruby dependencies
This commit is contained in:
Stefan Ceriu
2022-12-22 13:59:38 +02:00
committed by GitHub
parent 131197b7d7
commit ac77743c7a
23 changed files with 117 additions and 266 deletions
@@ -81,4 +81,6 @@ struct MockRoomProxy: RoomProxyProtocol {
}
return .failure(.failedRetrievingMembers)
}
func retryDecryption(forSessionId sessionId: String) async { }
}
+12 -6
View File
@@ -147,8 +147,6 @@ class RoomProxy: RoomProxyProtocol {
return .failure(.noMoreMessagesToBackPaginate)
}
let id = id // Copy the ID due to @Sendable requirement.
do {
let outcome: PaginationOutcome = try await Task.dispatch(on: .global()) {
try self.room.paginateBackwards(limit: UInt16(count))
@@ -242,19 +240,27 @@ class RoomProxy: RoomProxyProtocol {
}
}
func update(avatarURL: String?, forUserId userId: String) {
func retryDecryption(forSessionId sessionId: String) async {
await Task.dispatch(on: .global()) { [weak self] in
self?.room.retryDecryption(sessionIds: [sessionId])
}
}
// MARK: - Private
private func update(avatarURL: String?, forUserId userId: String) {
memberAvatars[userId] = avatarURL
}
func update(displayName: String?, forUserId userId: String) {
private func update(displayName: String?, forUserId userId: String) {
memberDisplayNames[userId] = displayName
}
func update(displayName: String) {
private func update(displayName: String) {
self.displayName = displayName
}
func update(backPaginationOutcome: PaginationOutcome) {
private func update(backPaginationOutcome: PaginationOutcome) {
self.backPaginationOutcome = backPaginationOutcome
}
}
@@ -67,6 +67,8 @@ protocol RoomProxyProtocol {
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
func members() async -> Result<[RoomMemberProxy], RoomProxyError>
func retryDecryption(forSessionId sessionId: String) async
}
extension RoomProxyProtocol {
@@ -62,10 +62,9 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
}
func updateRoomsWithIdentifiers(_ identifiers: [String]) {
#warning("This is a valid check but Rust doesn't set it correctly for selective ranged syncs")
// guard statePublisher.value == .live else {
// return
// }
guard statePublisher.value == .live else {
return
}
var changes = [CollectionDifference<RoomSummary>.Change]()
for identifier in identifiers {