Skip to content

HW done#102

Open
andreiRookie wants to merge 8 commits into
Otus-Android:masterfrom
andreiRookie:solution
Open

HW done#102
andreiRookie wants to merge 8 commits into
Otus-Android:masterfrom
andreiRookie:solution

Conversation

@andreiRookie

Copy link
Copy Markdown

No description provided.

@antonkazakov antonkazakov left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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