Skip to content

Commit

Permalink
Get rid of method @pixlwave doesn't like ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Dec 18, 2024
1 parent 994dbb8 commit 7f3cdd8
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ class TimelineInteractionHandler {
let debugInfo = timelineController.debugInfo(for: eventTimelineItem.id)
MXLog.info("Showing debug info for \(eventTimelineItem.id)")
actionsSubject.send(.showDebugInfo(debugInfo))
case .retryDecryption(let sessionID):
Task { await timelineController.retryDecryption(sessionIDs: [sessionID]) }
case .report:
actionsSubject.send(.displayReportContent(itemID: itemID, senderID: eventTimelineItem.sender.id))
case .react:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ enum TimelineItemMenuAction: Identifiable, Hashable {
case reply(isThread: Bool)
case forward(itemID: TimelineItemIdentifier)
case viewSource
case retryDecryption(sessionID: String)
case report
case react
case toggleReaction(key: String)
Expand Down Expand Up @@ -164,8 +163,6 @@ enum TimelineItemMenuAction: Identifiable, Hashable {
Label(L10n.actionRemoveMessage, icon: \.delete)
case .viewSource:
Label(L10n.actionViewSource, icon: \.code)
case .retryDecryption:
Label(L10n.actionRetryDecryption, systemImage: "arrow.down.message")
case .report:
Label(L10n.actionReportContent, icon: \.chatProblem)
case .react:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,7 @@ struct TimelineItemMenuActionProvider {
if isViewSourceEnabled {
actions.append(.viewSource)
}

switch encryptedItem.encryptionType {
case .megolmV1AesSha2(let sessionID, _):
secondaryActions.append(.retryDecryption(sessionID: sessionID))
default:
break
}


return .init(isReactable: false,
actions: actions,
secondaryActions: secondaryActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
nil
}

func retryDecryption(sessionIDs: [String]?) async { }

func eventTimestamp(for itemID: TimelineItemIdentifier) -> Date? {
timelineItemsTimestamp[itemID] ?? .now
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,6 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
return nil
}

func retryDecryption(sessionIDs: [String]?) async {
await activeTimeline.retryDecryption(sessionIDs: sessionIDs)
}

// MARK: - Private

/// The cancellable used to update the timeline items.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,5 @@ protocol RoomTimelineControllerProtocol {

func sendHandle(for itemID: TimelineItemIdentifier) -> SendHandleProxy?

func retryDecryption(sessionIDs: [String]?) async

func eventTimestamp(for itemID: TimelineItemIdentifier) -> Date?
}

0 comments on commit 7f3cdd8

Please sign in to comment.