mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Prevent crash
This commit is contained in:
parent
626b609e1e
commit
0756db1e8e
1 changed files with 6 additions and 4 deletions
|
@ -1224,11 +1224,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
private void onNotifyContactDelete(TupleMessageEx message) {
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (message.from != null && message.from.length > 0) {
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
InternetAddress from = (InternetAddress) message.from[0];
|
||||
String channelName = "notification." + from.getAddress().toLowerCase();
|
||||
nm.deleteNotificationChannel(channelName);
|
||||
InternetAddress from = (InternetAddress) message.from[0];
|
||||
String channelName = "notification." + from.getAddress().toLowerCase();
|
||||
nm.deleteNotificationChannel(channelName);
|
||||
}
|
||||
}
|
||||
|
||||
private void onAddContact(TupleMessageEx message) {
|
||||
|
|
Loading…
Reference in a new issue