From 6e7914172e7019e2349c037be7f2d37ae8dcd4d5 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 17:11:33 +0900 Subject: [PATCH 1/7] fix: Not able to Bus cancel --- .../bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt b/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt index d3df0271..3a5f3754 100644 --- a/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt +++ b/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt @@ -104,6 +104,7 @@ fun BusScreen(viewModel: BusViewModel = koinViewModel(), popBackStack: () -> Uni type = TopAppBarType.Medium, ) }, + containerColor = DodamTheme.colors.backgroundNeutral ) { paddingValues -> Column( modifier = Modifier @@ -135,7 +136,7 @@ fun BusScreen(viewModel: BusViewModel = koinViewModel(), popBackStack: () -> Uni viewModel.applyBus(uiState.buses[selectedIndex!!].id) } } else { - if (selectedIndex != null) { + if (selectedIndex != null && uiState.selectedBus?.id != uiState.buses.getOrNull(selectedIndex ?: 0)?.id) { viewModel.updateBus( uiState.buses[selectedIndex!!].id, selectedIndex!!, From 2ebd5d9c9f4cc4a27c5eb4e2efdc504a490bf169 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 17:15:56 +0900 Subject: [PATCH 2/7] fix: Student Ask Out Button Enable --- .../src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt b/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt index 4d14dc75..11ab63cd 100644 --- a/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt +++ b/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt @@ -313,7 +313,9 @@ internal fun AskOutScreen(viewModel: AskOutViewModel = koinViewModel(), popBackS Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.height(20.dp)) DodamButton( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 12.dp), onClick = { when { selectedItem.isOut() && outingDate.dayOfWeek == java.time.DayOfWeek.WEDNESDAY -> { @@ -338,7 +340,9 @@ internal fun AskOutScreen(viewModel: AskOutViewModel = koinViewModel(), popBackS text = "신청", buttonRole = ButtonRole.Primary, buttonSize = ButtonSize.Large, - enabled = !uiState.isLoading, + enabled = !uiState.isLoading && + ((selectedItem.isOut() && outingReason.length >= 5) || + (!selectedItem.isOut() && sleepoverReason.length >= 5)), loading = uiState.isLoading, ) } From 1c217afe9374b7df4aa4edc73dad8a09df5e75cd Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 17:42:32 +0900 Subject: [PATCH 3/7] fix: Wakeup Song Status Bar Color --- .../src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt b/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt index dfab9421..64a3da23 100644 --- a/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt +++ b/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt @@ -100,6 +100,7 @@ fun WakeupSongScreen( onBackClick = popBackStack, ) }, + containerColor = DodamTheme.colors.backgroundNeutral ) { paddingValues -> Box( modifier = Modifier From eab59d1e21b596a1bd2ccc2ff7f2479cd1f2c3f0 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 18:15:42 +0900 Subject: [PATCH 4/7] chore: Set Screen Portait --- dodam-student/src/main/AndroidManifest.xml | 3 ++- dodam-teacher-android/src/androidMain/AndroidManifest.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dodam-student/src/main/AndroidManifest.xml b/dodam-student/src/main/AndroidManifest.xml index 84de5910..92651377 100644 --- a/dodam-student/src/main/AndroidManifest.xml +++ b/dodam-student/src/main/AndroidManifest.xml @@ -19,7 +19,8 @@ android:name=".MainActivity" android:exported="true" android:label="@string/app_name" - android:theme="@style/Theme.Dodamdodamandroid"> + android:theme="@style/Theme.Dodamdodamandroid" + android:screenOrientation="portrait"> diff --git a/dodam-teacher-android/src/androidMain/AndroidManifest.xml b/dodam-teacher-android/src/androidMain/AndroidManifest.xml index 49133636..05f4e4a8 100644 --- a/dodam-teacher-android/src/androidMain/AndroidManifest.xml +++ b/dodam-teacher-android/src/androidMain/AndroidManifest.xml @@ -12,7 +12,8 @@ + android:name=".MainActivity" + android:screenOrientation="portrait"> From 2dcf6e45c5cea9e359110b3dda3792fff0015f4a Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 18:16:03 +0900 Subject: [PATCH 5/7] feat: Add Profile Image Upload Loading --- ...ofileModel.kt => EditMemberInfoUiState.kt} | 2 +- .../viewmodel/EditMemberInfoViewModel.kt | 36 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) rename feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/{ProfileModel.kt => EditMemberInfoUiState.kt} (85%) diff --git a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/ProfileModel.kt b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/EditMemberInfoUiState.kt similarity index 85% rename from feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/ProfileModel.kt rename to feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/EditMemberInfoUiState.kt index 90b53800..c35f6902 100644 --- a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/ProfileModel.kt +++ b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/model/EditMemberInfoUiState.kt @@ -1,6 +1,6 @@ package com.b1nd.dodam.editmemberinfo.model -data class ProfileModel( +data class EditMemberInfoUiState( val name: String = "", val email: String = "", val phone: String = "", diff --git a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt index dd571676..7114fe8e 100644 --- a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt +++ b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt @@ -5,7 +5,7 @@ import androidx.lifecycle.viewModelScope import com.b1nd.dodam.common.result.Result import com.b1nd.dodam.data.upload.UploadRepository import com.b1nd.dodam.editmemberinfo.model.EditMemberInfoSideEffect -import com.b1nd.dodam.editmemberinfo.model.ProfileModel +import com.b1nd.dodam.editmemberinfo.model.EditMemberInfoUiState import com.b1nd.dodam.member.MemberRepository import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -20,7 +20,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { private val memberRepository: MemberRepository by inject() private val uploadRepository: UploadRepository by inject() - private val _uiState = MutableStateFlow(ProfileModel()) + private val _uiState = MutableStateFlow(EditMemberInfoUiState()) val uiState = _uiState.asStateFlow() private val _sideEffect = MutableSharedFlow() @@ -45,16 +45,28 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { when (it) { is Result.Success -> { _sideEffect.emit(EditMemberInfoSideEffect.SuccessEditMemberInfo) - _uiState.value = _uiState.value.copy(isLoading = false) + _uiState.update { + it.copy( + isLoading = false + ) + } } is Result.Error -> { it.error.printStackTrace() - _uiState.value = _uiState.value.copy(isLoading = false) + _uiState.update { + it.copy( + isLoading = false + ) + } } is Result.Loading -> { - _uiState.value = _uiState.value.copy(isLoading = true) + _uiState.update { + it.copy( + isLoading = true + ) + } } } } @@ -70,6 +82,11 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { ).collect { when (it) { is Result.Error -> { + _uiState.update { + it.copy( + isLoading = false + ) + } it.error.printStackTrace() } @@ -78,11 +95,18 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { println(it.data) ui.copy( image = it.data.profileImage, + isLoading = false ) } } - is Result.Loading -> {} + is Result.Loading -> { + _uiState.update { + it.copy( + isLoading = true + ) + } + } } } } From 32122f2c0b5f9afc1c6f102d3c177b4a72a666d4 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 19:15:02 +0900 Subject: [PATCH 6/7] chore: Version Up to S3.4.0 and T3.1.0 --- .../src/main/kotlin/com/b1nd/dodam/student/DodamApp.kt | 2 +- dodam-teacher-android/build.gradle.kts | 4 ++-- .../kotlin/com/b1nd/dodam/teacher/DodamTeacherApp.kt | 2 +- gradle/libs.versions.toml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dodam-student/src/main/kotlin/com/b1nd/dodam/student/DodamApp.kt b/dodam-student/src/main/kotlin/com/b1nd/dodam/student/DodamApp.kt index 2a7b0428..3ff734c7 100644 --- a/dodam-student/src/main/kotlin/com/b1nd/dodam/student/DodamApp.kt +++ b/dodam-student/src/main/kotlin/com/b1nd/dodam/student/DodamApp.kt @@ -238,7 +238,7 @@ fun DodamApp( }, ) settingScreen( - versionInfo = "3.2.0", + versionInfo = "3.4.0", popBackStack = navController::popBackStack, logout = logout, navigationToEditMemberInfo = { profileImage, name, email, phone -> diff --git a/dodam-teacher-android/build.gradle.kts b/dodam-teacher-android/build.gradle.kts index af7ecf7f..f6c9e495 100644 --- a/dodam-teacher-android/build.gradle.kts +++ b/dodam-teacher-android/build.gradle.kts @@ -81,8 +81,8 @@ android { applicationId = "com.b1nd.dodam.teacher" minSdk = 28 targetSdk = 34 - versionCode = 2 - versionName = "3.0.0" + versionCode = 3 + versionName = "3.1.0" } compileOptions { diff --git a/dodam-teacher-android/src/commonMain/kotlin/com/b1nd/dodam/teacher/DodamTeacherApp.kt b/dodam-teacher-android/src/commonMain/kotlin/com/b1nd/dodam/teacher/DodamTeacherApp.kt index d8f5d2a9..7d8315c6 100644 --- a/dodam-teacher-android/src/commonMain/kotlin/com/b1nd/dodam/teacher/DodamTeacherApp.kt +++ b/dodam-teacher-android/src/commonMain/kotlin/com/b1nd/dodam/teacher/DodamTeacherApp.kt @@ -84,7 +84,7 @@ import kotlinx.coroutines.launch import org.koin.compose.viewmodel.koinViewModel import org.koin.core.annotation.KoinExperimentalAPI -const val VERSION_INFO = "3.0.0" +const val VERSION_INFO = "3.1.0" @OptIn(ExperimentalMaterial3Api::class, ExperimentalCoilApi::class, KoinExperimentalAPI::class) @Composable diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 17eeca10..dc7aac2a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,8 +3,8 @@ coilVersion = "2.7.0" compileSdk = "34" minSdk = "28" targetSdk = "34" -appVersion = "3.3.0" -versionCode = "8" +appVersion = "3.4.0" +versionCode = "9" # kotlin kotlin = "2.0.0" From 15047fefe75ca2520f648f54cebaad4ff720eba6 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Mon, 25 Nov 2024 19:26:14 +0900 Subject: [PATCH 7/7] style: Apply Spotless Format --- dodam-teacher-ios/iosApp/Info.plist | 4 ++-- .../main/java/com/b1nd/dodam/askout/AskOutScreen.kt | 6 ++++-- .../src/main/java/com/b1nd/dodam/bus/BusScreen.kt | 2 +- .../com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt | 2 +- .../viewmodel/EditMemberInfoViewModel.kt | 12 ++++++------ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dodam-teacher-ios/iosApp/Info.plist b/dodam-teacher-ios/iosApp/Info.plist index d8705fdf..2a6f4c1a 100644 --- a/dodam-teacher-ios/iosApp/Info.plist +++ b/dodam-teacher-ios/iosApp/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + 3.1.0 CFBundleVersion - 1 + 2 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt b/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt index 11ab63cd..655e4053 100644 --- a/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt +++ b/feature-student/ask-out/src/main/java/com/b1nd/dodam/askout/AskOutScreen.kt @@ -341,8 +341,10 @@ internal fun AskOutScreen(viewModel: AskOutViewModel = koinViewModel(), popBackS buttonRole = ButtonRole.Primary, buttonSize = ButtonSize.Large, enabled = !uiState.isLoading && - ((selectedItem.isOut() && outingReason.length >= 5) || - (!selectedItem.isOut() && sleepoverReason.length >= 5)), + ( + (selectedItem.isOut() && outingReason.length >= 5) || + (!selectedItem.isOut() && sleepoverReason.length >= 5) + ), loading = uiState.isLoading, ) } diff --git a/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt b/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt index 3a5f3754..2b2f475a 100644 --- a/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt +++ b/feature-student/bus/src/main/java/com/b1nd/dodam/bus/BusScreen.kt @@ -104,7 +104,7 @@ fun BusScreen(viewModel: BusViewModel = koinViewModel(), popBackStack: () -> Uni type = TopAppBarType.Medium, ) }, - containerColor = DodamTheme.colors.backgroundNeutral + containerColor = DodamTheme.colors.backgroundNeutral, ) { paddingValues -> Column( modifier = Modifier diff --git a/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt b/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt index 64a3da23..7bf1dd6d 100644 --- a/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt +++ b/feature-student/wakeup-song/src/main/java/com/b1nd/dodam/wakeupsong/WakeupSongScreen.kt @@ -100,7 +100,7 @@ fun WakeupSongScreen( onBackClick = popBackStack, ) }, - containerColor = DodamTheme.colors.backgroundNeutral + containerColor = DodamTheme.colors.backgroundNeutral, ) { paddingValues -> Box( modifier = Modifier diff --git a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt index 7114fe8e..4ad30a06 100644 --- a/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt +++ b/feature/edit-member-info/src/commonMain/kotlin/com/b1nd/dodam/editmemberinfo/viewmodel/EditMemberInfoViewModel.kt @@ -47,7 +47,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { _sideEffect.emit(EditMemberInfoSideEffect.SuccessEditMemberInfo) _uiState.update { it.copy( - isLoading = false + isLoading = false, ) } } @@ -56,7 +56,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { it.error.printStackTrace() _uiState.update { it.copy( - isLoading = false + isLoading = false, ) } } @@ -64,7 +64,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { is Result.Loading -> { _uiState.update { it.copy( - isLoading = true + isLoading = true, ) } } @@ -84,7 +84,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { is Result.Error -> { _uiState.update { it.copy( - isLoading = false + isLoading = false, ) } it.error.printStackTrace() @@ -95,7 +95,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { println(it.data) ui.copy( image = it.data.profileImage, - isLoading = false + isLoading = false, ) } } @@ -103,7 +103,7 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent { is Result.Loading -> { _uiState.update { it.copy( - isLoading = true + isLoading = true, ) } }