use of com.ichi2.async.TaskListener in project AnkiChinaAndroid by ankichinateam.
the class TemporaryModel method saveToDatabase.
public void saveToDatabase(TaskListener listener) {
Timber.d("saveToDatabase() called");
dumpChanges();
TemporaryModel.clearTempModelFiles();
TaskData args = new TaskData(new Object[] { mEditedModel, getAdjustedTemplateChanges() });
CollectionTask.launchCollectionTask(SAVE_MODEL, listener, args);
}
use of com.ichi2.async.TaskListener in project AnkiChinaAndroid by ankichinateam.
the class DeckPicker method mediaCheck.
public void mediaCheck() {
TaskListener listener = mediaCheckListener();
CollectionTask.launchCollectionTask(CHECK_MEDIA, listener);
}
use of com.ichi2.async.TaskListener in project AnkiChinaAndroid by ankichinateam.
the class DeckPickerFragment method updateDeckList.
public void updateDeckList(boolean quick) {
// CollectionHelper.getInstance().closeCollection(true,"refresh");
TaskListener listener = updateDeckListListener();
CollectionTask.TASK_TYPE taskType = quick ? LOAD_DECK_QUICK : LOAD_DECK_COUNTS;
CollectionTask.launchCollectionTask(taskType, listener);
}
use of com.ichi2.async.TaskListener in project AnkiChinaAndroid by ankichinateam.
the class DeckPickerFragment method undo.
private void undo() {
Timber.i("undo()");
String undoReviewString = getResources().getString(R.string.undo_action_review);
final boolean isReview = undoReviewString.equals(getCol().undoName(getResources()));
TaskListener listener = undoTaskListener(isReview);
CollectionTask.launchCollectionTask(UNDO, listener);
}
use of com.ichi2.async.TaskListener in project AnkiChinaAndroid by ankichinateam.
the class AnkiActivity method deleteDeck.
public void deleteDeck(final long did) {
try {
TaskListener listener = deleteDeckListener(did);
CollectionTask.launchCollectionTask(DELETE_DECK, listener, new TaskData(did));
} catch (Exception e) {
}
}
Aggregations