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)
This commit is contained in:
B. Petersen
2022-05-11 22:41:21 +02:00
committed by bjoern
parent 7cd60b2fc1
commit 8c88ea3bfb
@@ -84,9 +84,10 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
Util.runOnAnyBackgroundThread(() -> {
JSONObject info = this.dcAppMsg.getWebxdcInfo();
String chatName = WebxdcActivity.this.dcContext.getChat(WebxdcActivity.this.dcAppMsg.getChatId()).getName();
Util.runOnMain(() -> {
try {
getSupportActionBar().setTitle(info.getString("name"));
getSupportActionBar().setTitle(chatName + " – " + info.getString("name"));
} catch (Exception e) {
e.printStackTrace();
}