Skip to content

Conversation

@andreiRookie
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.

Привет. Оставил пару комментариев


@Inject
lateinit var vmFactory: ViewModelFactory
private val viewModel: ViewModelReceiver by lazy {
Copy link
Contributor

Choose a reason for hiding this comment

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

Не думаю что в lazy тем более потокобезопасном есть смысл


fun inject(fragment: FragmentReceiver)

@Component.Factory
Copy link
Contributor

Choose a reason for hiding this comment

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

А есть ли тут смысл в фабрике? не кажется когда у тебя параметров не добавляется билдер удобнее, ничего писать не нужно

}

companion object {
private var fragmentReceiverComponent: FragmentReceiverComponent? = null
Copy link
Contributor

Choose a reason for hiding this comment

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

Понадобиться где то его инстанс?

import javax.inject.Qualifier

@Qualifier
@Retention(AnnotationRetention.BINARY)
Copy link
Contributor

Choose a reason for hiding this comment

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

Можно убрать


class ViewModelReceiver(
class ViewModelReceiver @Inject constructor(
private val observer: Channel<LocalEvent>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Не очень правильно что ты можешь в приемники эмитить события в Channel, сделай здесь ReceiveChannel, а в другой ВМ SendChannel

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