Handling cancelled as a sendingFailed case (#1161)

* handling cancelled as a sendingFailed case

* changelog
This commit is contained in:
Mauro
2023-06-26 12:33:15 +02:00
committed by GitHub
parent 20b56d5800
commit fe97ea3093
3 changed files with 3 additions and 6 deletions

View File

@@ -74,8 +74,6 @@ struct TimelineItemStatusView: View {
context.sendFailedConfirmationDialogInfo = .init(transactionID: timelineItem.properties.transactionID)
}
}
case .cancelled:
EmptyView()
}
}

View File

@@ -39,7 +39,6 @@ enum TimelineItemDeliveryStatus: Hashable {
case sending
case sent
case sendingFailed
case cancelled
}
/// A light wrapper around event timeline items returned from Rust.
@@ -66,12 +65,11 @@ struct EventTimelineItemProxy {
switch localSendState {
case .notSentYet:
return .sending
case .sendingFailed:
// cancelled is exactly like sendingFailed but does not contain an error
case .sendingFailed, .cancelled:
return .sendingFailed
case .sent:
return .sent
case .cancelled:
return .cancelled
}
}

1
changelog.d/1160.bugfix Normal file
View File

@@ -0,0 +1 @@
Handled the cancelled state of a message properly as a failure state.