From 74fe95548272cfd9ade4470f7769e31b327f5c1c Mon Sep 17 00:00:00 2001 From: Hocuri Date: Mon, 15 Jun 2020 13:18:11 +0200 Subject: [PATCH 1/2] Generally show device message notifications for https://github.com/deltachat/deltachat-core-rust/pull/1613 --- .../securesms/notifications/NotificationCenter.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index 4eaa2ba85..58c909bc6 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -308,12 +308,6 @@ public class NotificationCenter { return; } - if (dcChat.isDeviceTalk()) { - // currently, we just never notify on device chat. - // esp. on first start, this is annoying. - return; - } - NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); // get notification text as a single line From 0ecf4e6292039f4a314b657b4daffcde4af6f6e3 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Mon, 15 Jun 2020 13:30:47 +0200 Subject: [PATCH 2/2] Open the password settings when the user clicks on a "wrong password" message --- src/org/thoughtcrime/securesms/ConversationFragment.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ConversationFragment.java b/src/org/thoughtcrime/securesms/ConversationFragment.java index 295c2bcd7..a0cced584 100644 --- a/src/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationFragment.java @@ -722,6 +722,15 @@ public class ConversationFragment extends Fragment else if(DozeReminder.isDozeReminderMsg(getContext(), messageRecord)) { DozeReminder.dozeReminderTapped(getContext()); } + else { + String self_mail = dcContext.getConfig("configured_mail_user"); + if (self_mail != null && !self_mail.isEmpty() + && messageRecord.getText().contains(self_mail) + && getListAdapter().getChat().isDeviceTalk()) { + // This is a device message informing the user that the password is wrong + startActivity(new Intent(getActivity(), RegistrationActivity.class)); + } + } } @Override