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
HW-7 Koin 적용 #580
HW-7 Koin 적용 #580
Conversation
single<MovieLocalDataSource> { MovieLocalDataSourceImpl(get()) } | ||
single<LoginLocalDataSource> { LoginLocalDataSourceImpl(get()) } | ||
single<PreferenceManager> { PreferenceManager(androidContext()) } | ||
single<MovieDao> { get<MovieDatabase>().movieDao() } | ||
single<MovieDatabase> { | ||
Room.databaseBuilder( | ||
androidContext(), | ||
MovieDatabase::class.java, "Movie.db" | ||
) | ||
.allowMainThreadQueries() | ||
.build() | ||
} |
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.
다른 모듈 에서도 보이는 코드인데 androidContext들을 get() 으로 바꿀 수 있을 것 같아요 ( 제가 이해한게 맞다면, startKoin에서 context를 전달받고 get()으로 전달받은 context를 사용 할 수 있는것 같아요 )
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.
e3a6a8c
수정했습니다.
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.
@sooakim approve했습니다 ~
if (BuildConfig.DEBUG) androidLogger() | ||
else androidLogger(Level.NONE) |
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.
{} 추가해주세요
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.
170728d
수정했습니다.
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.
보통 mvp 할때 Presenter를 factory로 많이 써요
지금 우리 예제에서는 mvvm이라서 viewModel을 사용하고 model 쪽은 single로만 구현하면 돼요
LGTM ✊ ✌️ 👋
factory 가 필요한데가 없어보여서 single로만 했는데 맞는지 모르겠네요.