@Override public void highlightAyah(int sura, int ayah) { if (mCoordinateData == null) { if (mCurrentTask != null && !(mCurrentTask instanceof QueryAyahCoordsTask)) { mCurrentTask.cancel(true); mCurrentTask = null; } if (mCurrentTask == null) { mCurrentTask = new QueryAyahCoordsTask(sura, ayah).execute(); } } else { handleHighlightAyah(sura, ayah); } }
@Override public void highlightAyah(int sura, int ayah, HighlightType type, boolean scrollToAyah) { if (mCoordinatesData == null) { if (mCurrentTask != null && !(mCurrentTask instanceof QueryAyahCoordsTask)) { mCurrentTask.cancel(true); mCurrentTask = null; } if (mCurrentTask == null) { mCurrentTask = new GetAyahCoordsTask(getActivity(), sura, ayah, type).execute(pageNumber); } } else { handleHighlightAyah(sura, ayah, type, scrollToAyah); } }