Skip to content

Commit bdb2503

Browse files
committed
[chore] #109 SelectDialog 관련 컴포넌트 choose -> select 네이밍 변경
1 parent 1f2d1df commit bdb2503

8 files changed

Lines changed: 27 additions & 27 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data class ArchiveMainState(
1616
val scannedImageUrl: String? = null,
1717
val selectedUris: ImmutableList<Uri> = persistentListOf(),
1818
val isShowAddDialog: Boolean = false,
19-
val isShowChooseWithAlbumDialog: Boolean = false,
19+
val isShowSelectWithAlbumDialog: Boolean = false,
2020
val isShowAddAlbumBottomSheet: Boolean = false,
2121
) {
2222
val uploadType: UploadType
@@ -38,7 +38,7 @@ sealed interface ArchiveMainIntent {
3838

3939
data object ClickGalleryUploadRow : ArchiveMainIntent
4040
data class SelectGalleryImage(val uris: List<Uri>) : ArchiveMainIntent
41-
data object DismissChooseWithAlbumDialog : ArchiveMainIntent
41+
data object DismissSelectWithAlbumDialog : ArchiveMainIntent
4242
data object ClickUploadWithAlbumRow : ArchiveMainIntent
4343
data object ClickUploadWithoutAlbumRow : ArchiveMainIntent
4444

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import com.neki.android.feature.archive.impl.main.component.ArchiveMainPhotoItem
4646
import com.neki.android.feature.archive.impl.main.component.ArchiveMainTitleRow
4747
import com.neki.android.feature.archive.impl.main.component.ArchiveMainTopBar
4848
import com.neki.android.feature.archive.impl.main.component.AlbumUploadOption
49-
import com.neki.android.feature.archive.impl.main.component.ChooseWithAlbumDialog
49+
import com.neki.android.feature.archive.impl.main.component.SelectWithAlbumDialog
5050
import com.neki.android.feature.archive.impl.main.component.GotoTopButton
5151
import com.neki.android.feature.archive.impl.main.component.NoPhotoContent
5252
import kotlinx.collections.immutable.persistentListOf
@@ -176,9 +176,9 @@ internal fun ArchiveMainScreen(
176176
)
177177
}
178178

179-
if (uiState.isShowChooseWithAlbumDialog) {
180-
ChooseWithAlbumDialog(
181-
onDismissRequest = { onIntent(ArchiveMainIntent.DismissChooseWithAlbumDialog) },
179+
if (uiState.isShowSelectWithAlbumDialog) {
180+
SelectWithAlbumDialog(
181+
onDismissRequest = { onIntent(ArchiveMainIntent.DismissSelectWithAlbumDialog) },
182182
onSelect = { option ->
183183
when (option) {
184184
AlbumUploadOption.WITHOUT_ALBUM -> onIntent(ArchiveMainIntent.ClickUploadWithoutAlbumRow)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ArchiveMainViewModel @Inject constructor(
4949
is ArchiveMainIntent.QRCodeScanned -> reduce {
5050
copy(
5151
scannedImageUrl = intent.imageUrl,
52-
isShowChooseWithAlbumDialog = true,
52+
isShowSelectWithAlbumDialog = true,
5353
)
5454
}
5555

@@ -74,16 +74,16 @@ class ArchiveMainViewModel @Inject constructor(
7474

7575
is ArchiveMainIntent.SelectGalleryImage -> reduce {
7676
copy(
77-
isShowChooseWithAlbumDialog = true,
77+
isShowSelectWithAlbumDialog = true,
7878
selectedUris = intent.uris.toImmutableList(),
7979
)
8080
}
8181

82-
ArchiveMainIntent.DismissChooseWithAlbumDialog -> reduce { copy(isShowChooseWithAlbumDialog = false) }
82+
ArchiveMainIntent.DismissSelectWithAlbumDialog -> reduce { copy(isShowSelectWithAlbumDialog = false) }
8383
ArchiveMainIntent.ClickUploadWithAlbumRow -> {
8484
reduce {
8585
copy(
86-
isShowChooseWithAlbumDialog = false,
86+
isShowSelectWithAlbumDialog = false,
8787
scannedImageUrl = null,
8888
selectedUris = persistentListOf(),
8989
)
@@ -171,7 +171,7 @@ class ArchiveMainViewModel @Inject constructor(
171171
reduce: (ArchiveMainState.() -> ArchiveMainState) -> Unit,
172172
postSideEffect: (ArchiveMainSideEffect) -> Unit,
173173
) {
174-
reduce { copy(isShowChooseWithAlbumDialog = false) }
174+
reduce { copy(isShowSelectWithAlbumDialog = false) }
175175
val onSuccessSideEffect = {
176176
reduce { copy(isLoading = false) }
177177
postSideEffect(ArchiveMainSideEffect.ShowToastMessage("이미지를 추가했어요"))

feature/archive/impl/src/main/kotlin/com/neki/android/feature/archive/impl/main/component/ChooseWithAlbumDialog.kt renamed to feature/archive/impl/src/main/kotlin/com/neki/android/feature/archive/impl/main/component/SelectWithAlbumDialog.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal enum class AlbumUploadOption(val label: String) {
1515
}
1616

1717
@Composable
18-
internal fun ChooseWithAlbumDialog(
18+
internal fun SelectWithAlbumDialog(
1919
onDismissRequest: () -> Unit = {},
2020
onSelect: (AlbumUploadOption) -> Unit = {},
2121
) {
@@ -28,8 +28,8 @@ internal fun ChooseWithAlbumDialog(
2828

2929
@ComponentPreview
3030
@Composable
31-
private fun ChooseWithAlbumDialogPreview() {
31+
private fun SelectWithAlbumDialogPreview() {
3232
NekiTheme {
33-
ChooseWithAlbumDialog()
33+
SelectWithAlbumDialog()
3434
}
3535
}

feature/mypage/impl/src/main/java/com/neki/android/feature/mypage/impl/main/MyPageContract.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data class MyPageState(
1212
val profileImageState: EditProfileImageType = EditProfileImageType.OriginalImageUrl(""),
1313
val isShowLogoutDialog: Boolean = false,
1414
val isShowWithdrawDialog: Boolean = false,
15-
val isShowImageChooseDialog: Boolean = false,
15+
val isShowImageSelectDialog: Boolean = false,
1616
// Permission
1717
val isGrantedCamera: Boolean = false,
1818
val isGrantedLocation: Boolean = false,
@@ -37,7 +37,7 @@ sealed interface MyPageIntent {
3737
data object ClickBackIcon : MyPageIntent
3838
data object ClickEditIcon : MyPageIntent
3939
data object ClickCameraIcon : MyPageIntent
40-
data object DismissImageChooseDialog : MyPageIntent
40+
data object DismissImageSelectDialog : MyPageIntent
4141
data class SelectProfileImage(val image: EditProfileImageType) : MyPageIntent
4242
data class ClickEditComplete(val nickname: String) : MyPageIntent
4343
data object ClickLogout : MyPageIntent

feature/mypage/impl/src/main/java/com/neki/android/feature/mypage/impl/main/MyPageViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ internal class MyPageViewModel @Inject constructor(
5555
}
5656

5757
MyPageIntent.ClickEditIcon -> postSideEffect(MyPageEffect.NavigateToEditProfile)
58-
MyPageIntent.ClickCameraIcon -> reduce { copy(isShowImageChooseDialog = true) }
59-
MyPageIntent.DismissImageChooseDialog -> reduce { copy(isShowImageChooseDialog = false) }
60-
is MyPageIntent.SelectProfileImage -> reduce { copy(profileImageState = intent.image, isShowImageChooseDialog = false) }
58+
MyPageIntent.ClickCameraIcon -> reduce { copy(isShowImageSelectDialog = true) }
59+
MyPageIntent.DismissImageSelectDialog -> reduce { copy(isShowImageSelectDialog = false) }
60+
is MyPageIntent.SelectProfileImage -> reduce { copy(profileImageState = intent.image, isShowImageSelectDialog = false) }
6161
is MyPageIntent.ClickEditComplete -> {
6262
val isNicknameChanged = state.userInfo.nickname != intent.nickname
6363
val isProfileImageChanged = state.profileImageState !is EditProfileImageType.OriginalImageUrl

feature/mypage/impl/src/main/java/com/neki/android/feature/mypage/impl/profile/EditProfileScreen.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import com.neki.android.feature.mypage.impl.main.MyPageViewModel
4646
import com.neki.android.feature.mypage.impl.profile.model.EditProfileImageType
4747
import com.neki.android.feature.mypage.impl.profile.component.EditProfileImage
4848
import com.neki.android.feature.mypage.impl.profile.component.ProfileEditTopBar
49-
import com.neki.android.feature.mypage.impl.profile.component.ChooseProfileImageDialog
49+
import com.neki.android.feature.mypage.impl.profile.component.SelectProfileImageDialog
5050
import com.neki.android.feature.mypage.impl.profile.component.ProfileImageOption
5151
import timber.log.Timber
5252

@@ -176,16 +176,16 @@ fun EditProfileScreen(
176176
}
177177
}
178178

179-
if (uiState.isShowImageChooseDialog) {
180-
ChooseProfileImageDialog(
181-
onDismissRequest = { onIntent(MyPageIntent.DismissImageChooseDialog) },
179+
if (uiState.isShowImageSelectDialog) {
180+
SelectProfileImageDialog(
181+
onDismissRequest = { onIntent(MyPageIntent.DismissImageSelectDialog) },
182182
onSelect = { option ->
183183
when (option) {
184184
ProfileImageOption.DEFAULT_PROFILE -> {
185185
onIntent(MyPageIntent.SelectProfileImage(EditProfileImageType.Default))
186186
}
187187
ProfileImageOption.SELECT_PHOTO -> {
188-
onIntent(MyPageIntent.DismissImageChooseDialog)
188+
onIntent(MyPageIntent.DismissImageSelectDialog)
189189
photoPicker.launch(
190190
PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly),
191191
)

feature/mypage/impl/src/main/java/com/neki/android/feature/mypage/impl/profile/component/ChooseProfileImageDialog.kt renamed to feature/mypage/impl/src/main/java/com/neki/android/feature/mypage/impl/profile/component/SelectProfileImageDialog.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal enum class ProfileImageOption(val label: String) {
1616
}
1717

1818
@Composable
19-
internal fun ChooseProfileImageDialog(
19+
internal fun SelectProfileImageDialog(
2020
properties: DialogProperties = DialogProperties(usePlatformDefaultWidth = false),
2121
onDismissRequest: () -> Unit = {},
2222
onSelect: (ProfileImageOption) -> Unit = {},
@@ -31,8 +31,8 @@ internal fun ChooseProfileImageDialog(
3131

3232
@ComponentPreview
3333
@Composable
34-
private fun ChooseProfileImageDialogPreview() {
34+
private fun SelectProfileImageDialogPreview() {
3535
NekiTheme {
36-
ChooseProfileImageDialog()
36+
SelectProfileImageDialog()
3737
}
3838
}

0 commit comments

Comments
 (0)