use of com.ichi2.async.DeckTask.TaskListener in project Anki-Android by Ramblurr.
the class MultimediaCardEditorActivity method save.
private void save() {
NoteService.saveMedia((MultimediaEditableNote) mNote);
NoteService.updateJsonNoteFromMultimediaNote(mNote, mEditorNote);
TaskListener listener = new TaskListener() {
@Override
public void onProgressUpdate(TaskData... values) {
// TODO Auto-generated method stub
}
@Override
public void onPreExecute() {
// TODO Auto-generated method stub
}
@Override
public void onPostExecute(TaskData result) {
// TODO Auto-generated method stub
}
};
if (mAddNote) {
DeckTask.launchDeckTask(DeckTask.TASK_TYPE_ADD_FACT, listener, new DeckTask.TaskData(mEditorNote));
} else {
DeckTask.launchDeckTask(DeckTask.TASK_TYPE_UPDATE_FACT, listener, new DeckTask.TaskData(mCol.getSched(), mCard, false));
}
setResult(Activity.RESULT_OK);
finish();
animateRight();
}
Aggregations