Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Webxdc-message in chat (#2413) #2431

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Delta Chat iOS Changelog

## Unreleased

- Show a Webxdc-app in chat (#2413)

## v1.50.1
2024-12

Expand Down
11 changes: 11 additions & 0 deletions deltachat-ios/Controller/WebxdcViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,17 @@ class WebxdcViewController: WebViewViewController {
let shareAction = UIAlertAction(title: String.localized("menu_share"), style: .default, handler: shareWebxdc(_:))
alert.addAction(shareAction)

let showInChatAction = UIAlertAction(title: String.localized("show_in_chat"), style: .default) { [weak self] _ in
guard let self, let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return }
let message = dcContext.getMessage(id: self.messageId)
let chatId = message.chatId

DispatchQueue.main.async {
appDelegate.appCoordinator.showChat(chatId: chatId, msgId: message.id, animated: true, clearViewControllerStack: true)
}
}
alert.addAction(showInChatAction)

let cancelAction = UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil)
alert.addAction(cancelAction)
self.present(alert, animated: true, completion: nil)
Expand Down
Loading