-
Notifications
You must be signed in to change notification settings - Fork 205
Hw reactive cats kuzmin #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hw reactive cats kuzmin #120
Conversation
antonkazakov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Привет. Оставил несколько комментариев
| import java.util.concurrent.Callable | ||
| import kotlin.random.Random | ||
|
|
||
| class CatFactsCallable( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Первый раз вижу такую реализацию, а почему просто не вызвать Single/Oservable.fromCallable?
| return Flowable.empty() | ||
| val catFacts = context.resources.getStringArray(R.array.local_cat_facts) | ||
| return Flowable.fromCallable(CatFactsCallable(catFacts)) | ||
| .repeatWhen { it.delay(2, TimeUnit.SECONDS) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проверку на дубликат давай решим через специализированный оператор
| catsService: CatsService, | ||
| localCatFactsGenerator: LocalCatFactsGenerator, | ||
| context: Context | ||
| val catsService: CatsService, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private
|
Поправил. |
No description provided.