mirror of https://github.com/M66B/FairEmail.git
Alert improvements
This commit is contained in:
parent
f5ca8f746d
commit
0ed815fff7
|
@ -1028,6 +1028,7 @@ public class FragmentAccount extends FragmentBase {
|
||||||
if (!synchronize) {
|
if (!synchronize) {
|
||||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
nm.cancel("receive:" + account.id, 1);
|
nm.cancel("receive:" + account.id, 1);
|
||||||
|
nm.cancel("alert:" + account.id, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -401,6 +401,9 @@ public class Helper {
|
||||||
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
|
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
if (ex instanceof Core.AlertException)
|
||||||
|
return ex.getMessage();
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
if (BuildConfig.DEBUG)
|
if (BuildConfig.DEBUG)
|
||||||
sb.append(ex.toString());
|
sb.append(ex.toString());
|
||||||
|
|
|
@ -601,7 +601,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
|
|
||||||
if (message != null && !message.startsWith("Too many simultaneous connections")) {
|
if (message != null && !message.startsWith("Too many simultaneous connections")) {
|
||||||
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
nm.notify("receive:" + account.id, 1,
|
nm.notify("alert:" + account.id, 1,
|
||||||
Core.getNotificationError(
|
Core.getNotificationError(
|
||||||
ServiceSynchronize.this, "warning", account.name,
|
ServiceSynchronize.this, "warning", account.name,
|
||||||
new Core.AlertException(message))
|
new Core.AlertException(message))
|
||||||
|
|
Loading…
Reference in New Issue