Fixes #2808 - Switch the message sending failure options from a dialog to an alert

* Fixes #2808 - Switch the message sending failure options from a dialog to an alert
- this prevents it from showing up as a popup on the room list on an iPad
- it used to be set on the timeline and not on the timeline item because of our use of a UITableView
* Cleanup room screen action names
This commit is contained in:
Stefan Ceriu
2024-05-09 14:35:47 +03:00
committed by GitHub
parent d97f912df7
commit 905b21e0a8
16 changed files with 180 additions and 245 deletions
@@ -55,7 +55,6 @@ struct RoomScreen: View {
.toolbarBackground(.visible, for: .navigationBar) // Fix the toolbar's background.
.overlay { loadingIndicator }
.alert(item: $context.alertInfo)
.alert(item: $context.confirmationAlertInfo)
.sheet(item: $context.debugInfo) { TimelineItemDebugView(info: $0) }
.sheet(item: $context.actionMenuInfo) { info in
context.viewState.timelineItemMenuActionProvider?(info.item.id).map { actions in
@@ -82,14 +81,6 @@ struct RoomScreen: View {
context.send(viewAction: .handlePasteOrDrop(provider: provider))
return true
}
.confirmationDialog(item: $context.sendFailedConfirmationDialogInfo, titleVisibility: .visible) { info in
Button(L10n.screenRoomRetrySendMenuSendAgainAction) {
context.send(viewAction: .retrySend(itemID: info.itemID))
}
Button(L10n.actionRemove, role: .destructive) {
context.send(viewAction: .cancelSend(itemID: info.itemID))
}
}
}
private var timeline: some View {
@@ -168,7 +159,7 @@ struct RoomScreen: View {
private var callButton: some View {
if context.viewState.hasOngoingCall {
Button {
context.send(viewAction: .presentCall)
context.send(viewAction: .displayCall)
} label: {
Label(L10n.actionJoin, icon: \.videoCallSolid)
.labelStyle(.titleAndIcon)
@@ -177,7 +168,7 @@ struct RoomScreen: View {
.accessibilityIdentifier(A11yIdentifiers.roomScreen.joinCall)
} else {
Button {
context.send(viewAction: .presentCall)
context.send(viewAction: .displayCall)
} label: {
CompoundIcon(\.videoCallSolid)
}