use of org.wikipedia.page.bottomcontent.MainPageReadMoreTopicTask in project apps-android-wikipedia by wikimedia.
the class BecauseYouReadClient method request.
@Override
public void request(@NonNull Context context, @NonNull final WikiSite wiki, int age, @NonNull final FeedClient.Callback cb) {
cancel();
readMoreTopicTask = new MainPageReadMoreTopicTask(age) {
@Override
public void onFinish(@Nullable HistoryEntry entry) {
if (entry == null) {
cb.success(Collections.emptyList());
return;
}
getCardForHistoryEntry(entry, cb);
}
@Override
public void onCatch(Throwable caught) {
L.e("Error fetching 'because you read' suggestions", caught);
cb.error(caught);
}
};
readMoreTopicTask.execute();
}
Aggregations