Last active
February 12, 2019 17:48
-
-
Save Levi-Moreira/96460527bcfe7dec27e255d4908db310 to your computer and use it in GitHub Desktop.
This file contains 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 UsersDataSourceFactory @Inject constructor( | |
val api: StackOverflowConfig | |
) : DataSource.Factory<Int, User>() { | |
var observableEmitter: PublishSubject<UsersDataSource> = PublishSubject.create() | |
override fun create(): DataSource<Int, User> { | |
val usersDataSource = UsersDataSource(api) | |
observableEmitter.onNext(usersDataSource) | |
return usersDataSource | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment