Skip to content

Commit 1f52203

Browse files
committed
[build] #59,64,69: detekt 린트 수정
1 parent fb2196a commit 1f52203

2 files changed

Lines changed: 23 additions & 28 deletions

File tree

core/data/src/main/java/com/neki/android/core/data/repository/di/RepositoryModule.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ internal interface RepositoryModule {
6767
fun bindFolderRepositoryImpl(
6868
folderRepositoryImpl: FolderRepositoryImpl,
6969
): FolderRepository
70-
70+
71+
@Binds
72+
@Singleton
7173
fun bindMapRepositoryImpl(
7274
mapRepositoryImpl: MapRepositoryImpl,
7375
): MapRepository

feature/archive/impl/src/main/kotlin/com/neki/android/feature/archive/impl/navigation/ArchiveEntryProvider.kt

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ object ArchiveEntryProviderModule {
4141
@IntoSet
4242
@Provides
4343
fun provideArchiveEntryBuilder(navigator: Navigator): EntryProviderInstaller = {
44-
archiveEntry(navigator)
44+
archiveMainEntry(navigator)
45+
allPhotoEntry(navigator)
46+
allAlbumEntry(navigator)
47+
albumDetailEntry(navigator)
48+
photoDetailEntry(navigator)
4549
}
4650
}
4751

48-
private fun EntryProviderScope<NavKey>.archiveEntry(navigator: Navigator) {
52+
private fun EntryProviderScope<NavKey>.archiveMainEntry(navigator: Navigator) {
4953
entry<ArchiveNavKey.Archive> {
5054
val resultBus = LocalResultEventBus.current
5155
val viewModel = hiltViewModel<ArchiveMainViewModel>()
@@ -54,7 +58,6 @@ private fun EntryProviderScope<NavKey>.archiveEntry(navigator: Navigator) {
5458
is QRScanResult.QRCodeScanned -> {
5559
viewModel.store.onIntent(ArchiveMainIntent.QRCodeScanned(result.imageUrl))
5660
}
57-
5861
QRScanResult.OpenGallery -> {
5962
viewModel.store.onIntent(ArchiveMainIntent.ClickGalleryUploadRow)
6063
}
@@ -71,23 +74,18 @@ private fun EntryProviderScope<NavKey>.archiveEntry(navigator: Navigator) {
7174
navigateToUploadAlbumWithQRScan = navigator::navigateToUploadAlbum,
7275
navigateToAllAlbum = navigator::navigateToAllAlbum,
7376
navigateToFavoriteAlbum = { id ->
74-
navigator.navigateToAlbumDetail(
75-
id = id,
76-
isFavorite = true,
77-
)
77+
navigator.navigateToAlbumDetail(id = id, isFavorite = true)
7878
},
7979
navigateToAlbumDetail = { id, title ->
80-
navigator.navigateToAlbumDetail(
81-
id = id,
82-
title = title,
83-
isFavorite = false,
84-
)
80+
navigator.navigateToAlbumDetail(id = id, title = title, isFavorite = false)
8581
},
8682
navigateToAllPhoto = navigator::navigateToAllPhoto,
8783
navigateToPhotoDetail = navigator::navigateToPhotoDetail,
8884
)
8985
}
86+
}
9087

88+
private fun EntryProviderScope<NavKey>.allPhotoEntry(navigator: Navigator) {
9189
entry<ArchiveNavKey.AllPhoto> {
9290
val resultBus = LocalResultEventBus.current
9391
val viewModel = hiltViewModel<AllPhotoViewModel>()
@@ -109,32 +107,27 @@ private fun EntryProviderScope<NavKey>.archiveEntry(navigator: Navigator) {
109107
navigateToPhotoDetail = navigator::navigateToPhotoDetail,
110108
)
111109
}
110+
}
112111

112+
private fun EntryProviderScope<NavKey>.allAlbumEntry(navigator: Navigator) {
113113
entry<ArchiveNavKey.AllAlbum> {
114114
AllAlbumRoute(
115115
navigateBack = navigator::goBack,
116116
navigateToFavoriteAlbum = { id ->
117-
navigator.navigateToAlbumDetail(
118-
id = id,
119-
isFavorite = true,
120-
)
117+
navigator.navigateToAlbumDetail(id = id, isFavorite = true)
121118
},
122119
navigateToAlbumDetail = { id, title ->
123-
navigator.navigateToAlbumDetail(
124-
id = id,
125-
title = title,
126-
isFavorite = false,
127-
)
120+
navigator.navigateToAlbumDetail(id = id, title = title, isFavorite = false)
128121
},
129122
)
130123
}
124+
}
131125

126+
private fun EntryProviderScope<NavKey>.albumDetailEntry(navigator: Navigator) {
132127
entry<ArchiveNavKey.AlbumDetail> { key ->
133128
val resultBus = LocalResultEventBus.current
134129
val viewModel = hiltViewModel<AlbumDetailViewModel, AlbumDetailViewModel.Factory>(
135-
creationCallback = { factory ->
136-
factory.create(key.albumId, key.title, key.isFavorite)
137-
},
130+
creationCallback = { factory -> factory.create(key.albumId, key.title, key.isFavorite) },
138131
)
139132

140133
ResultEffect<ArchiveResult>(resultBus) { result ->
@@ -154,13 +147,13 @@ private fun EntryProviderScope<NavKey>.archiveEntry(navigator: Navigator) {
154147
navigateToPhotoDetail = navigator::navigateToPhotoDetail,
155148
)
156149
}
150+
}
157151

152+
private fun EntryProviderScope<NavKey>.photoDetailEntry(navigator: Navigator) {
158153
entry<ArchiveNavKey.PhotoDetail> { key ->
159154
PhotoDetailRoute(
160155
viewModel = hiltViewModel<PhotoDetailViewModel, PhotoDetailViewModel.Factory>(
161-
creationCallback = { factory ->
162-
factory.create(key.photo)
163-
},
156+
creationCallback = { factory -> factory.create(key.photo) },
164157
),
165158
navigateBack = navigator::goBack,
166159
)

0 commit comments

Comments
 (0)