Update local favourites count

This commit is contained in:
seven332 committed 2018-09-14 19:48:48 +08:00
1 parent 1cd8ef1b47
commit dcc6af3367
1 file changed
+9 -2
@@ -883,15 +883,22 @@ public class FavoritesScene extends BaseScene implements
} else {
list = EhDB.searchLocalFavorites(keyword);
}
if (list.size() == 0) {
mHelper.setPages(taskId, 0);
mHelper.onGetPageData(taskId, Collections.EMPTY_LIST);
} else {
mFavLocalCount = list.size();
Settings.putFavLocalCount(mFavLocalCount);
mHelper.setPages(taskId, 1);
mHelper.onGetPageData(taskId, list);
}
if (TextUtils.isEmpty(keyword)) {
mFavLocalCount = list.size();
Settings.putFavLocalCount(mFavLocalCount);
if (mDrawerAdapter != null) {
mDrawerAdapter.notifyDataSetChanged();
}
}
}
}