Skip to content

Instantly share code, notes, and snippets.

@seoft
Created May 22, 2021 06:13
Show Gist options
  • Save seoft/255362abd692e2e95ccecd4d083fcd37 to your computer and use it in GitHub Desktop.
Save seoft/255362abd692e2e95ccecd4d083fcd37 to your computer and use it in GitHub Desktop.
SettingRepository.kt
class SettingRepository(private val settingLocalDataSource: SettingLocalDataSource) {
// 중략
fun getLatelySearchKeyword(): Single<List<String>> {
return Single.just(settingLocalDataSource.getLatelySearchKeyword())
}
fun addLatelySearchKeyword(keyword: String): Completable {
settingLocalDataSource.addLatelySearchKeyword(keyword)
return Completable.complete()
}
fun clearLatelySearchKeyword(): Completable {
settingLocalDataSource.clearLatelySearchKeyword()
return Completable.complete()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment