Bläddra i källkod

show context of Webxdc window (#1578)

* show context of Webxdc window

show the chat name in front of the webxdc name to
- prevent phishing (the window will not show just the name of your bank)
- give the user an idea about where the webxdc sends messages to
  (important eg. when using the same webxdc from different chats)

* swap order to 'WebxdcName - ChatName'
bjoern 3 år sedan
förälder
incheckning
091ed39b8d
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      deltachat-ios/Controller/WebxdcViewController.swift

+ 4 - 1
deltachat-ios/Controller/WebxdcViewController.swift

@@ -137,7 +137,10 @@ class WebxdcViewController: WebViewViewController {
     
     
     override func viewDidLoad() {
     override func viewDidLoad() {
         super.viewDidLoad()
         super.viewDidLoad()
-        self.title = dcContext.getMessage(id: messageId).getWebxdcInfoDict()["name"] as? String
+        let msg = dcContext.getMessage(id: messageId)
+        let chatName = dcContext.getChat(chatId: msg.chatId).name
+        let webxdcName = msg.getWebxdcInfoDict()["name"] as? String ?? ""
+        self.title = webxdcName + " – " + chatName
     }
     }
     
     
     override func willMove(toParent parent: UIViewController?) {
     override func willMove(toParent parent: UIViewController?) {