mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-14 13:03:13 +02:00
Alert improvements
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user