Skip to content

Commit

Permalink
Hide messae-bar when forwarding (#2435)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Dec 13, 2024
1 parent 4c5bac9 commit a2fc2e0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {

if RelayHelper.shared.isForwarding() {
if RelayHelper.shared.forwardIds != nil {
resignFirstResponder()
askToForwardMessage()
} else if let vcardData = RelayHelper.shared.forwardVCardData,
let vcardURL = prepareVCardData(vcardData) {
Expand Down Expand Up @@ -1355,22 +1356,21 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
}

private func askToForwardMessage() {
let chat = dcContext.getChat(chatId: self.chatId)
let chat = dcContext.getChat(chatId: chatId)
if chat.isSelfTalk {
RelayHelper.shared.forwardIdsAndFinishRelaying(to: self.chatId)
RelayHelper.shared.forwardIdsAndFinishRelaying(to: chatId)
refreshMessages()
} else {
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)
})
}
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)
self.becomeFirstResponder()
},
cancelHandler: { [weak self] _ in
self?.navigationController?.popViewController(animated: true)
})
}
}

Expand Down

0 comments on commit a2fc2e0

Please sign in to comment.