private void resetAfterReviewEarly() { Cursor cursor = null; long[] ids = null; try { cursor = AnkiDb.database.rawQuery("SELECT id " + "FROM cards " + "WHERE priority = -1", null); if (cursor.moveToFirst()) { int count = cursor.getCount(); ids = new long[count]; for (int i = 0; i < count; i++) { ids[i] = cursor.getLong(0); cursor.moveToNext(); } } } finally { if (cursor != null) cursor.close(); } if (ids != null) { updatePriorities(ids); flushMod(); } if (reviewEarly || newEarly) { reviewEarly = false; newEarly = false; checkDue(); } }
public void unsuspendCards(long[] ids) { AnkiDb.database.execSQL( "UPDATE cards SET " + "priority = 0, " + "modified = " + String.format(ENGLISH_LOCALE, "%f", (double) (System.currentTimeMillis() / 1000.0)) + " WHERE id IN " + ids2str(ids)); updatePriorities(ids); rebuildCounts(false); flushMod(); }
public void setSessionTimeLimit(long num) { if (num >= 0) { sessionTimeLimit = num; flushMod(); } }
public void setNewCardsPerDay(int num) { if (num >= 0) { newCardsPerDay = num; flushMod(); } }
public void setNewCardOrder(int num) { if (num >= 0) { newCardOrder = num; flushMod(); } }
public void setNewCardSpacing(int num) { if (num >= 0) { newCardSpacing = num; flushMod(); } }
public void setRevCardOrder(int num) { if (num >= 0) { revCardOrder = num; flushMod(); } }