Fixed reload after save account/identity

pull/146/head
M66B 7 years ago
parent 13d655d4a9
commit a36cd063cc

@ -84,7 +84,6 @@ public class ApplicationEx extends Application {
"error",
getString(R.string.channel_error),
NotificationManager.IMPORTANCE_HIGH);
error.setShowBadge(false);
error.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
nm.createNotificationChannel(error);
}

@ -656,6 +656,7 @@ public class FragmentAccount extends FragmentEx {
boolean check = (synchronize && (account == null ||
!host.equals(account.host) || Integer.parseInt(port) != account.port ||
!user.equals(account.user) || !password.equals(account.password)));
boolean reload = (account == null || account.synchronize != synchronize || check);
// Check IMAP server
if (check) {
@ -770,7 +771,7 @@ public class FragmentAccount extends FragmentEx {
db.endTransaction();
}
if (check)
if (reload)
ServiceSynchronize.reload(getContext(), "save account");
return null;

@ -438,6 +438,7 @@ public class FragmentIdentity extends FragmentEx {
boolean check = (synchronize && (identity == null ||
!host.equals(identity.host) || Integer.parseInt(port) != identity.port ||
!user.equals(identity.user) || !password.equals(identity.password)));
boolean reload = (identity == null || identity.synchronize != synchronize || check);
// Check SMTP server
if (check) {
@ -500,7 +501,7 @@ public class FragmentIdentity extends FragmentEx {
db.endTransaction();
}
if (check)
if (reload)
ServiceSynchronize.reload(getContext(), "save identity");
return null;

Loading…
Cancel
Save