Reload on delete only if synchronizing

This commit is contained in:
M66B
2018-11-13 10:27:25 +01:00
parent c8a76bf1be
commit 9a7802d319
2 changed files with 10 additions and 4 deletions

View File

@@ -521,8 +521,11 @@ public class FragmentIdentity extends FragmentEx {
@Override
protected Void onLoad(Context context, Bundle args) {
long id = args.getLong("id");
DB.getInstance(context).identity().deleteIdentity(id);
ServiceSynchronize.reload(getContext(), "delete identity");
DB db = DB.getInstance(context);
EntityIdentity identity = db.identity().getIdentity(id);
db.identity().deleteIdentity(id);
if (identity.synchronize)
ServiceSynchronize.reload(getContext(), "delete identity");
return null;
}