Skip to content

Commit

Permalink
prefer .alert over .actionSheet for unexpected popups as warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Feb 9, 2025
1 parent 59f9fa7 commit 192a317
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,7 @@ extension ChatViewController: BaseMessageCellDelegate {
// prefer previewError over QLPreviewController.canPreview().
// (the latter returns `true` for .webm - which is not wrong as _something_ is shown, even if the video cannot be played)
if previewError && message.type == DC_MSG_VIDEO {
let alert = UIAlertController(title: "To play this video, share to apps as VLC on the following page.", message: nil, preferredStyle: .safeActionSheet)
let alert = UIAlertController(title: "To play this video, share to apps as VLC on the following page.", message: nil, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: String.localized("perm_continue"), style: .default, handler: { _ in
self.showMediaGalleryFor(message: message)
}))
Expand Down Expand Up @@ -2597,7 +2597,7 @@ extension ChatViewController: AudioControllerDelegate {
func onAudioPlayFailed() {
let alert = UIAlertController(title: String.localized("error"),
message: String.localized("cannot_play_audio_file"),
preferredStyle: .safeActionSheet)
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: String.localized("ok"), style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ class AccountSetupController: UITableViewController {
let oldAddress = dcContext.getConfig("configured_addr"),
oldAddress != emailAddress {
let msg = String.localizedStringWithFormat(String.localized("aeap_explanation"), oldAddress, emailAddress)
let alert = UIAlertController(title: msg, message: nil, preferredStyle: .safeActionSheet)
alert.addAction(UIAlertAction(title: String.localized("perm_continue"), style: .default, handler: { _ in
let alert = UIAlertController(title: msg, message: nil, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: String.localized("perm_continue"), style: .destructive, handler: { _ in
loginButtonPressedContinue()
}))
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal final class AdvancedViewController: UITableViewController {
if cell.isOn {
let alert = UIAlertController(title: String.localized("pref_only_fetch_mvbox_title"),
message: String.localized("pref_imap_folder_warn_disable_defaults"),
preferredStyle: .safeActionSheet)
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: String.localized("perm_continue"), style: .destructive, handler: { _ in
self.dcContext.setConfigBool("only_fetch_mvbox", true)
}))
Expand Down

0 comments on commit 192a317

Please sign in to comment.