private synchronized void deliverModel() { if (prefs != null && contents != null) { ((EmPubLiteActivity) getActivity()).setupPager(prefs, contents); } else { if (prefs == null && prefsTask == null) { prefsTask = new PrefsLoadTask(); executeAsyncTask(prefsTask, getActivity().getApplicationContext()); } else if (contents == null && contentsTask == null) { updateBook(); } } }
void updateBook() { contentsTask = new ContentsLoadTask(); executeAsyncTask(contentsTask, getActivity().getApplicationContext()); }