Alert improvements

This commit is contained in:
M66B 2019-06-24 08:45:55 +02:00
parent f5ca8f746d
commit 0ed815fff7
3 changed files with 5 additions and 1 deletions

View File

@ -1028,6 +1028,7 @@ public class FragmentAccount extends FragmentBase {
if (!synchronize) {
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel("receive:" + account.id, 1);
nm.cancel("alert:" + account.id, 1);
}
return false;

View File

@ -401,6 +401,9 @@ public class Helper {
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
return null;
if (ex instanceof Core.AlertException)
return ex.getMessage();
StringBuilder sb = new StringBuilder();
if (BuildConfig.DEBUG)
sb.append(ex.toString());

View File

@ -601,7 +601,7 @@ public class ServiceSynchronize extends LifecycleService {
if (message != null && !message.startsWith("Too many simultaneous connections")) {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify("receive:" + account.id, 1,
nm.notify("alert:" + account.id, 1,
Core.getNotificationError(
ServiceSynchronize.this, "warning", account.name,
new Core.AlertException(message))