|
|
@ -456,12 +456,12 @@ public class FragmentRules extends FragmentBase {
|
|
|
|
boolean all = args.getBoolean("all");
|
|
|
|
boolean all = args.getBoolean("all");
|
|
|
|
|
|
|
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
|
|
if (all) {
|
|
|
|
if (all)
|
|
|
|
db.rule().deleteRules(fid);
|
|
|
|
db.rule().deleteRules(fid);
|
|
|
|
return null;
|
|
|
|
else {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EntityFolder folder = db.folder().getFolder(fid);
|
|
|
|
EntityFolder folder = db.folder().getFolder(fid);
|
|
|
|
if (folder == null)
|
|
|
|
if (folder == null)
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
@ -481,6 +481,12 @@ public class FragmentRules extends FragmentBase {
|
|
|
|
if (type == TYPE_MOVE && target == junk.id)
|
|
|
|
if (type == TYPE_MOVE && target == junk.id)
|
|
|
|
db.rule().deleteRule(rule.id);
|
|
|
|
db.rule().deleteRule(rule.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
db.endTransaction();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|