Refactoring

pull/212/head
M66B 2 years ago
parent fa266cdec3
commit 64d1e39c8c

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

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

Loading…
Cancel
Save