Merge pull request #1416 from deltachat/warn-wrong-pw

Generally show device message notifications, open password settings if the user clicks on a "wrong pw" message
This commit is contained in:
bjoern
2020-07-13 13:13:35 +02:00
committed by GitHub
2 changed files with 9 additions and 6 deletions
@@ -711,6 +711,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
@@ -321,12 +321,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