|
|
|
@ -197,10 +197,10 @@ public class FragmentOrder extends FragmentBase {
|
|
|
|
|
final boolean reset = args.getBoolean("reset");
|
|
|
|
|
final long[] ids = args.getLongArray("ids");
|
|
|
|
|
|
|
|
|
|
final DB db = DB.getInstance(context);
|
|
|
|
|
db.runInTransaction(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
try {
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < ids.length; i++)
|
|
|
|
|
if (EntityAccount.class.getName().equals(clazz))
|
|
|
|
|
db.account().setAccountOrder(ids[i], reset ? null : i);
|
|
|
|
@ -208,8 +208,11 @@ public class FragmentOrder extends FragmentBase {
|
|
|
|
|
db.folder().setFolderOrder(ids[i], reset ? null : i);
|
|
|
|
|
else
|
|
|
|
|
throw new IllegalArgumentException("Unknown class=" + clazz);
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
} finally {
|
|
|
|
|
db.endTransaction();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|