mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
626b609e1e
commit
0756db1e8e
|
@ -1224,11 +1224,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.O)
|
@TargetApi(Build.VERSION_CODES.O)
|
||||||
private void onNotifyContactDelete(TupleMessageEx message) {
|
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];
|
InternetAddress from = (InternetAddress) message.from[0];
|
||||||
String channelName = "notification." + from.getAddress().toLowerCase();
|
String channelName = "notification." + from.getAddress().toLowerCase();
|
||||||
nm.deleteNotificationChannel(channelName);
|
nm.deleteNotificationChannel(channelName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onAddContact(TupleMessageEx message) {
|
private void onAddContact(TupleMessageEx message) {
|
||||||
|
|
Loading…
Reference in New Issue