Refactoring

This commit is contained in:
M66B 2023-03-24 11:31:54 +01:00
parent fa266cdec3
commit 64d1e39c8c
2 changed files with 5 additions and 5 deletions

View File

@ -170,5 +170,5 @@ public interface DaoOperation {
int deleteOperation(long id);
@Query("DELETE FROM operation WHERE folder = :folder AND name = :name")
int deleteOperation(long folder, String name);
int deleteOperations(long folder, String name);
}

View File

@ -739,7 +739,7 @@ public class EntityOperation {
break;
}
int count = db.operation().deleteOperation(fid, SYNC);
int count = db.operation().deleteOperations(fid, SYNC);
Map<String, String> crumb = new HashMap<>();
crumb.put("folder", Long.toString(fid));
@ -776,7 +776,7 @@ public class EntityOperation {
}
if (force)
db.operation().deleteOperation(fid, SYNC);
db.operation().deleteOperations(fid, SYNC);
// TODO: replace sync parameters?
if (db.operation().getOperationCount(fid, SYNC) == 0) {
@ -848,7 +848,7 @@ public class EntityOperation {
try {
JSONArray jargs = new JSONArray(args);
long target = jargs.getLong(0);
db.operation().deleteOperation(target, PURGE);
db.operation().deleteOperations(target, PURGE);
} catch (Throwable ex) {
Log.e(ex);
}
@ -885,7 +885,7 @@ public class EntityOperation {
}
if (MOVE.equals(name)) {
int count = db.operation().deleteOperation(folder, PURGE);
int count = db.operation().deleteOperations(folder, PURGE);
if (count > 0)
sync(context, folder, false);
}