Simplified error handling

This commit is contained in:
M66B
2019-06-23 20:56:07 +02:00
parent b5921b8390
commit dea368dd96
9 changed files with 89 additions and 148 deletions

View File

@@ -2917,10 +2917,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
db.message().deleteMessage(id);
db.folder().setFolderError(message.folder, null);
db.identity().setIdentityError(message.identity, null);
if (message.identity != null) {
db.identity().setIdentityError(message.identity, null);
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel("send", message.identity.intValue());
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel("send:" + message.identity, 1);
}
} else
EntityOperation.queue(context, message, EntityOperation.DELETE);
@@ -3091,7 +3093,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.identity != null) {
// Identity can be deleted
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel("send", message.identity.intValue());
nm.cancel("send:" + message.identity, 1);
}
return null;