use of com.ichi2.async.CollectionTask.TASK_TYPE.LOAD_COLLECTION_COMPLETE in project AnkiChinaAndroid by ankichinateam.
the class StudyOptionsFragment method onResume.
@Override
public void onResume() {
super.onResume();
Timber.d("onResume()");
if (getAnkiActivity() == null) {
return;
}
if (mTabLayout != null) {
mTabLayout.selectTab(mTabLayout.getTabAt(0));
}
if (mCacheID != -1) {
getCol().getDecks().select(mCacheID);
} else {
mCacheID = getCol().getDecks().selected();
}
new Handler().postDelayed(() -> {
firstLoadDeck = false;
refreshInterface(true);
}, firstLoadDeck ? 0 : 500);
// updateDeckList();
/**
* Complete task and enqueue fetching nonessential data for
* startup.
*/
CollectionTask.launchCollectionTask(LOAD_COLLECTION_COMPLETE);
getAnkiActivity().supportInvalidateOptionsMenu();
}
Aggregations