-
Notifications
You must be signed in to change notification settings - Fork 174
Dagger2 homework Белянин Роман #37
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?
Conversation
| @ApplicationContext | ||
| fun provideApplicationContext(): Context | ||
|
|
||
| fun provideColorGenerator(): ColorGenerator |
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.
ColorGenerator не нужен на уровне всего Application, по хорошему он должен быть в модуле у ProducerFragmentComponent
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
| super.onViewCreated(view, savedInstanceState) | ||
| frame = view.findViewById(R.id.frame) | ||
| GlobalScope.launch { |
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.
GlobalScope лучше не использовать, можно взять lifecycleScope
|
|
||
| fun provideColorGenerator(): ColorGenerator | ||
|
|
||
| fun provideState(): MutableStateFlow<Int> |
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.
Стэйт нужен в модуле активити компонента, которая создает фрагменты с цветом
|
Исправил |
Dagger2 homework Белянин Роман