Created
November 17, 2017 14:05
-
-
Save Dimillian/7a7da2c96e49a83b820b8beed968bef3 to your computer and use it in GitHub Desktop.
BooksCollectionAllBooksDataProvider.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BooksCollectionAllBooksDataProvider: BaseBooksCollectionDataProvider { | |
override var title: String { | |
return "All Books" | |
} | |
override var datasource: [ObjectId] { | |
if let user = store.state.usersState.users[user] { | |
return user.allBooks | |
} | |
return [] | |
} | |
override func loadData(paginationDelegate: PaginationDelegate) { | |
store.dispatchQueue(UserRequests.FetchAllBooks(user: user, | |
limit: paginationDelegate.limit, | |
offset: paginationDelegate.offset, | |
useCache: false)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment