|
|
|
@ -297,6 +297,7 @@ public class DatabaseDao<TYPE extends AbstractModel> {
|
|
|
|
boolean recordOutstanding = shouldRecordOutstanding(item);
|
|
|
|
boolean recordOutstanding = shouldRecordOutstanding(item);
|
|
|
|
final AtomicBoolean result = new AtomicBoolean(false);
|
|
|
|
final AtomicBoolean result = new AtomicBoolean(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
synchronized(database) {
|
|
|
|
if (recordOutstanding) { // begin transaction
|
|
|
|
if (recordOutstanding) { // begin transaction
|
|
|
|
database.getDatabase().beginTransactionWithListener(new SQLiteTransactionListener() {
|
|
|
|
database.getDatabase().beginTransactionWithListener(new SQLiteTransactionListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -325,6 +326,7 @@ public class DatabaseDao<TYPE extends AbstractModel> {
|
|
|
|
onModelUpdated(item, recordOutstanding && numOutstanding > 0);
|
|
|
|
onModelUpdated(item, recordOutstanding && numOutstanding > 0);
|
|
|
|
item.markSaved();
|
|
|
|
item.markSaved();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return result.get();
|
|
|
|
return result.get();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|