mirror of https://github.com/M66B/FairEmail.git
Reload on delete only if synchronizing
This commit is contained in:
parent
c8a76bf1be
commit
9a7802d319
|
@ -840,8 +840,11 @@ public class FragmentAccount extends FragmentEx {
|
||||||
@Override
|
@Override
|
||||||
protected Void onLoad(Context context, Bundle args) {
|
protected Void onLoad(Context context, Bundle args) {
|
||||||
long id = args.getLong("id");
|
long id = args.getLong("id");
|
||||||
DB.getInstance(context).account().deleteAccount(id);
|
DB db = DB.getInstance(context);
|
||||||
ServiceSynchronize.reload(getContext(), "delete account");
|
EntityAccount account = db.account().getAccount(id);
|
||||||
|
db.account().deleteAccount(id);
|
||||||
|
if (account.synchronize)
|
||||||
|
ServiceSynchronize.reload(getContext(), "delete account");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -521,8 +521,11 @@ public class FragmentIdentity extends FragmentEx {
|
||||||
@Override
|
@Override
|
||||||
protected Void onLoad(Context context, Bundle args) {
|
protected Void onLoad(Context context, Bundle args) {
|
||||||
long id = args.getLong("id");
|
long id = args.getLong("id");
|
||||||
DB.getInstance(context).identity().deleteIdentity(id);
|
DB db = DB.getInstance(context);
|
||||||
ServiceSynchronize.reload(getContext(), "delete identity");
|
EntityIdentity identity = db.identity().getIdentity(id);
|
||||||
|
db.identity().deleteIdentity(id);
|
||||||
|
if (identity.synchronize)
|
||||||
|
ServiceSynchronize.reload(getContext(), "delete identity");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue