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-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/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"> 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/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 4d14dc75..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 @@ -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,11 @@ 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, ) } 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..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,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!!, 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..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,6 +100,7 @@ fun WakeupSongScreen( onBackClick = popBackStack, ) }, + containerColor = DodamTheme.colors.backgroundNeutral, ) { paddingValues -> Box( modifier = Modifier 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..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 @@ -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, + ) + } + } } } } 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"