Don't ever write false has_more values in fetch history when modified_after > 0

pull/14/head
Sam Bosley 12 years ago
parent d268f3fa19
commit 9c5eff5368

@ -136,7 +136,8 @@ public class FetchHistory<TYPE extends RemoteModel> {
try { try {
template = dao.getModelClass().newInstance(); template = dao.getModelClass().newInstance();
template.setValue(historyTimeProperty, time); template.setValue(historyTimeProperty, time);
template.setValue(historyHasMoreProperty, hasMore ? 1 : 0); if (modifiedAfter == 0 || hasMore)
template.setValue(historyHasMoreProperty, hasMore ? 1 : 0);
dao.update(RemoteModel.UUID_PROPERTY.eq(uuid), template); dao.update(RemoteModel.UUID_PROPERTY.eq(uuid), template);
} catch (InstantiationException e) { } catch (InstantiationException e) {
Log.e(ERROR_TAG, "Error instantiating model for recording time", e); Log.e(ERROR_TAG, "Error instantiating model for recording time", e);

Loading…
Cancel
Save