Skip to content

Commit

Permalink
fix showing input bar after forwarding
Browse files Browse the repository at this point in the history
this commit shows the forward-confirmation-alert
to _after_ the view controller is really created.

otherwise, on some iOS versions,
the alert interferes with setting up the view controller in viewWillAppear

closes #2153
  • Loading branch information
r10s committed May 12, 2024
1 parent 8032e1f commit 947f27f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1370,14 +1370,17 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
RelayHelper.shared.forwardIdsAndFinishRelaying(to: self.chatId)
refreshMessages()
} else {
confirmationAlert(title: String.localizedStringWithFormat(String.localized("ask_forward"), chat.name),
actionTitle: String.localized("menu_forward"),
actionHandler: { _ in
RelayHelper.shared.forwardIdsAndFinishRelaying(to: self.chatId)
self.dismiss(animated: true, completion: nil)},
cancelHandler: { _ in
self.dismiss(animated: false, completion: nil)
self.navigationController?.popViewController(animated: true)})
DispatchQueue.main.async { [weak self] in
self?.confirmationAlert(title: String.localizedStringWithFormat(String.localized("ask_forward"), chat.name),
actionTitle: String.localized("menu_forward"),
actionHandler: { [weak self] _ in
guard let self else { return }
RelayHelper.shared.forwardIdsAndFinishRelaying(to: self.chatId)
},
cancelHandler: { [weak self] _ in
self?.navigationController?.popViewController(animated: true)
})
}
}
}

Expand Down

0 comments on commit 947f27f

Please sign in to comment.