Added mergeLatch.await() before titleCatItems are returned

This commit is contained in:
misaochan 2016-10-21 17:57:36 +13:00
parent a04312919e
commit b9f6bd55ca

View file

@ -142,8 +142,13 @@ public class CategorizationFragment extends Fragment {
mergeLatch.countDown();
}
};
Utils.executeAsyncTask(titleCategoriesSub);
titleCategoriesSub.execute();
Log.d(TAG, "TitleCatItems in titleCatQuery: " + titleCatItems);
try {
mergeLatch.await();
} catch (InterruptedException e) {
Log.e(TAG, "Interrupted exception: ", e);
}
return titleCatItems;
}