Skip to content
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

[Core] Release S3.4.0 and T3.1.0 #264

Merged
merged 7 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dodam-student/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
4 changes: 2 additions & 2 deletions dodam-teacher-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion dodam-teacher-android/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<activity
android:exported="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode"
android:name=".MainActivity">
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dodam-teacher-ios/iosApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>3.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand All @@ -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,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ fun BusScreen(viewModel: BusViewModel = koinViewModel(), popBackStack: () -> Uni
type = TopAppBarType.Medium,
)
},
containerColor = DodamTheme.colors.backgroundNeutral,
) { paddingValues ->
Column(
modifier = Modifier
Expand Down Expand Up @@ -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!!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ fun WakeupSongScreen(
onBackClick = popBackStack,
)
},
containerColor = DodamTheme.colors.backgroundNeutral,
) { paddingValues ->
Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<EditMemberInfoSideEffect>()
Expand All @@ -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,
)
}
}
}
}
Expand All @@ -70,6 +82,11 @@ class EditMemberInfoViewModel : ViewModel(), KoinComponent {
).collect {
when (it) {
is Result.Error -> {
_uiState.update {
it.copy(
isLoading = false,
)
}
it.error.printStackTrace()
}

Expand All @@ -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,
)
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading