Merge pull request #3687 from deltachat/adb/fix-crash-orphan-webxdc-info-msg

avoid crash when clicking orphan info messages from webxdc
This commit is contained in:
adb
2025-03-18 19:17:56 +00:00
committed by GitHub
3 changed files with 9 additions and 2 deletions
+4
View File
@@ -1,5 +1,9 @@
# Delta Chat Android Changelog
## Unreleased
* ignore click in info-messages from deleted in-chat apps
## v1.56.0
2025-03
@@ -747,7 +747,10 @@ public class ConversationFragment extends MessageSelectorFragment
DozeReminder.dozeReminderTapped(getContext());
}
else if(messageRecord.getInfoType() == DcMsg.DC_INFO_WEBXDC_INFO_MESSAGE) {
WebxdcActivity.openWebxdcActivity(getContext(), messageRecord.getParent(), messageRecord.getWebxdcHref());
if (messageRecord.getParent() != null) {
// if the parent webxdc message still exists
WebxdcActivity.openWebxdcActivity(getContext(), messageRecord.getParent(), messageRecord.getWebxdcHref());
}
}
else {
String self_mail = dcContext.getConfig("configured_mail_user");
@@ -106,7 +106,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
openWebxdcActivity(context, instance, "");
}
public static void openWebxdcActivity(Context context, DcMsg instance, String href) {
public static void openWebxdcActivity(Context context, @NonNull DcMsg instance, String href) {
openWebxdcActivity(context, instance.getId(), false, href);
}