Prevent deleting folders with pending operations

pull/146/head
M66B 6 years ago
parent 498c9d351e
commit 0b8475223c

@ -272,6 +272,11 @@ public class FragmentFolder extends FragmentEx {
long id = args.getLong("id");
DB db = DB.getInstance(getContext());
int count = db.operation().getOperationCount(id, null);
if (count > 0)
throw new IllegalArgumentException(
getResources().getQuantityString(
R.plurals.title_notification_operations, count, count));
db.folder().setFolderTbd(id);
ServiceSynchronize.reload(getContext(), "delete folder");

Loading…
Cancel
Save