1 package com.moiseum.wolnelektury.view.book.list;
3 import com.moiseum.wolnelektury.storage.BookStorage;
4 import com.moiseum.wolnelektury.base.DataProvider;
5 import com.moiseum.wolnelektury.base.WLApplication;
6 import com.moiseum.wolnelektury.connection.models.BookModel;
7 import com.moiseum.wolnelektury.connection.services.BooksService;
11 import retrofit2.Call;
16 public class DownloadedBooksDataProvider extends DataProvider<List<BookModel>, BooksService> {
19 public void load(String lastKey) {
20 if (dataObserver != null && lastKey == null) {
21 BookStorage bookStorage = WLApplication.getInstance().getBookStorage();
22 dataObserver.onLoadSuccess(bookStorage.all());
27 public Call<List<BookModel>> execute(BooksService service) {
32 protected Class<BooksService> getServiceClass() {