Skip to content

Conversation

@AlexanderYKuzmin
Copy link

No description provided.

Copy link
Contributor

@antonkazakov antonkazakov left a 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(
Copy link
Contributor

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) }
Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

@AlexanderYKuzmin
Copy link
Author

Поправил.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants