From dec9f5be06acc817dc809a38d19e29a43170a40e Mon Sep 17 00:00:00 2001 From: uiel Date: Sat, 18 May 2024 23:13:18 +0900 Subject: [PATCH 01/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=83=81?= =?UTF-8?q?=EB=B2=8C=EC=A0=90=20=EB=B0=95=EC=8A=A4=20=EC=83=89=EC=83=81=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dms/android/feature/main/mypage/MyPageScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/mypage/MyPageScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/mypage/MyPageScreen.kt index 3112880d3..8b4475344 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/mypage/MyPageScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/mypage/MyPageScreen.kt @@ -406,14 +406,14 @@ private enum class PointCardType { val contentColor: Color @Composable inline get() = when (this) { - BONUS -> DmsTheme.colorScheme.error - MINUS -> DmsTheme.colorScheme.primary + BONUS -> DmsTheme.colorScheme.primary + MINUS -> DmsTheme.colorScheme.error } val borderColor: Color @Composable inline get() = when (this) { - BONUS -> DmsTheme.colorScheme.error - MINUS -> DmsTheme.colorScheme.primary + BONUS -> DmsTheme.colorScheme.primary + MINUS -> DmsTheme.colorScheme.error } val text: String From e59cb0f9bb67f564d830955527163e465905c5fa Mon Sep 17 00:00:00 2001 From: uiel Date: Mon, 20 May 2024 10:12:34 +0900 Subject: [PATCH 02/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/application/ApplicationScreen.kt | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt index 01e13dfbc..405444822 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt @@ -39,6 +39,7 @@ import team.aliens.dms.android.core.ui.horizontalPadding import team.aliens.dms.android.core.ui.topPadding import team.aliens.dms.android.core.ui.verticalPadding import team.aliens.dms.android.feature.R +import team.aliens.dms.android.shared.date.util.today @OptIn(ExperimentalMaterial3Api::class) @Destination @@ -136,24 +137,25 @@ private fun ApplicationCard( color = DmsTheme.colorScheme.onSurface, style = DmsTheme.typography.title2, ) - AnimatedVisibility( - visible = appliedTitle != null, - enter = slideInVertically() + fadeIn(), - exit = slideOutVertically() + fadeOut(), - ) { - if (appliedTitle != null) { - RoundedButton( - onClick = {}, - fillMinSize = false, - contentPadding = PaddingValues( - horizontal = PaddingDefaults.Medium, - vertical = PaddingDefaults.Small, - ), - ) { - Text(text = appliedTitle) - } - } - } + // TODO: 태그 업데이트 로직 추가 +// AnimatedVisibility( +// visible = appliedTitle != null, +// enter = slideInVertically() + fadeIn(), +// exit = slideOutVertically() + fadeOut(), +// ) { +// if (appliedTitle != null) { +// RoundedButton( +// onClick = {}, +// fillMinSize = false, +// contentPadding = PaddingValues( +// horizontal = PaddingDefaults.Medium, +// vertical = PaddingDefaults.Small, +// ), +// ) { +// Text(text = appliedTitle) +// } +// } +// } } Text( modifier = Modifier From fd48833146ffbacea7d74d284cd970195eb00684 Mon Sep 17 00:00:00 2001 From: uiel Date: Tue, 4 Jun 2024 21:01:36 +0900 Subject: [PATCH 03/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=ED=8C=8C=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dms/android/feature/notice/NoticeDetailsScreen.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt index efd483064..8af053fd4 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt @@ -23,6 +23,7 @@ import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.ramcosta.composedestinations.annotation.Destination +import org.threeten.bp.LocalDateTime import team.aliens.dms.android.core.designsystem.Scaffold import team.aliens.dms.android.core.designsystem.DmsTheme import team.aliens.dms.android.core.designsystem.DmsTopAppBar @@ -88,7 +89,7 @@ internal fun NoticeDetailsScreen( modifier = Modifier .fillMaxWidth() .horizontalPadding(), - text = uiState.createdAt.toString(), + text = uiState.createdAt.text, style = DmsTheme.typography.caption, color = DmsTheme.colorScheme.onSurfaceVariant, ) @@ -125,3 +126,7 @@ internal fun NoticeDetailsScreen( } } } + +private val LocalDateTime?.text: String + @Composable inline get() = "${this?.year}-${this?.monthValue}-${this?.dayOfMonth} ${this?.hour}:${this?.minute}" + From 11487f159a455e924c80d4adeb22949a647cb0f7 Mon Sep 17 00:00:00 2001 From: uiel Date: Wed, 5 Jun 2024 09:00:38 +0900 Subject: [PATCH 04/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EC=BD=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/aliens/dms/android/core/ui/composable/TextFields.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/ui/src/main/java/team/aliens/dms/android/core/ui/composable/TextFields.kt b/core/ui/src/main/java/team/aliens/dms/android/core/ui/composable/TextFields.kt index 6a21a7ad1..8575578a7 100644 --- a/core/ui/src/main/java/team/aliens/dms/android/core/ui/composable/TextFields.kt +++ b/core/ui/src/main/java/team/aliens/dms/android/core/ui/composable/TextFields.kt @@ -28,6 +28,7 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import team.aliens.dms.android.core.designsystem.DmsIcon import team.aliens.dms.android.core.designsystem.DmsTheme import team.aliens.dms.android.core.designsystem.R import team.aliens.dms.android.core.designsystem.TextField @@ -46,8 +47,8 @@ fun PasswordTextField( textStyle: TextStyle = DmsTheme.typography.body2, hintText: String = "", trailingIcon: Pair = Pair( - painterResource(id = R.drawable.ic_password_invisible), - painterResource(id = R.drawable.ic_password_visible), + painterResource(id = DmsIcon.PasswordVisible), + painterResource(id = DmsIcon.PasswordInvisible), ), supportingText: @Composable (() -> Unit)? = null, isError: Boolean = false, From 9e6b5ed8f4048030e8e47179de52b55ca9b7c898 Mon Sep 17 00:00:00 2001 From: uiel Date: Wed, 5 Jun 2024 10:05:34 +0900 Subject: [PATCH 05/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=9D=B8=20?= =?UTF-8?q?=EC=95=B1=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 ++ gradle/libs.versions.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6faca4d95..c86233b8d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -121,4 +121,6 @@ dependencies { testImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.junit) + + implementation(libs.app.update.ktx) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3863c9049..3f2c3ce6e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,6 +4,7 @@ accompanist = "0.34.0" androidx-window = "1.3.0-alpha02" activity = "1.8.2" appcompat = "1.6.1" +appUpdateKtx = "2.1.0" core = "1.12.0" datastorePreferences = "1.0.0" espresso = "3.5.1" @@ -58,6 +59,7 @@ androidx-compose-material = { group = "androidx.compose.material3", name = "mate androidx-compose-material-window = { group = "androidx.compose.material3", name = "material3-window-size-class-android", version.ref = "materialCompose" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" } androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigation" } +app-update-ktx = { module = "com.google.android.play:app-update-ktx", version.ref = "appUpdateKtx" } composeDestinations = { group = "io.github.raamcosta.compose-destinations", name = "animations-core", version.ref = "composeDestination" } composeDestinations-ksp = { group = "io.github.raamcosta.compose-destinations", name = "ksp", version.ref = "composeDestination" } javax-inject = { module = "javax.inject:javax.inject", version.ref = "javaxInject" } From 7d539fc2924941d51e92eea909037b6d7b76e680 Mon Sep 17 00:00:00 2001 From: uiel Date: Wed, 5 Jun 2024 10:06:12 +0900 Subject: [PATCH 06/18] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20=EC=9D=B8=20?= =?UTF-8?q?=EC=95=B1=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aliens/dms/android/app/MainActivity.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/src/main/java/team/aliens/dms/android/app/MainActivity.kt b/app/src/main/java/team/aliens/dms/android/app/MainActivity.kt index 06dd942d5..90d69ce6d 100644 --- a/app/src/main/java/team/aliens/dms/android/app/MainActivity.kt +++ b/app/src/main/java/team/aliens/dms/android/app/MainActivity.kt @@ -8,6 +8,9 @@ import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSiz import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass import androidx.core.view.WindowCompat import com.google.accompanist.adaptive.calculateDisplayFeatures +import com.google.android.play.core.appupdate.AppUpdateManagerFactory +import com.google.android.play.core.install.model.AppUpdateType +import com.google.android.play.core.install.model.UpdateAvailability import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.StateFlow import team.aliens.dms.android.core.designsystem.DmsTheme @@ -30,6 +33,7 @@ class MainActivity : ComponentActivity() { WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, ) + checkAppUpdate() setContent { val windowSizeClass = calculateWindowSizeClass(activity = this) val displayFeatures = calculateDisplayFeatures(activity = this) @@ -43,4 +47,23 @@ class MainActivity : ComponentActivity() { } } } + + private fun checkAppUpdate() { + val appUpdateManager = AppUpdateManagerFactory.create(this) + val appUpdateInfoTask = appUpdateManager.appUpdateInfo + + appUpdateInfoTask.addOnSuccessListener { appUpdateInfo -> + val isUpdateAvailable = + appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE + + if (isUpdateAvailable && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)) { + appUpdateManager.startUpdateFlowForResult( + appUpdateInfo, + AppUpdateType.IMMEDIATE, + this, + 0, + ) + } + } + } } From 0278549d8a7030610dd4f45dc63f014fe5c3df4e Mon Sep 17 00:00:00 2001 From: uiel Date: Fri, 7 Jun 2024 15:03:21 +0900 Subject: [PATCH 07/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EC=BD=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/feature/remains/RemainsApplicationScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/remains/RemainsApplicationScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/remains/RemainsApplicationScreen.kt index e5fa5ede6..fced48f6d 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/remains/RemainsApplicationScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/remains/RemainsApplicationScreen.kt @@ -35,13 +35,13 @@ import com.ramcosta.composedestinations.annotation.Destination import org.threeten.bp.DayOfWeek import team.aliens.dms.android.core.designsystem.ButtonDefaults import team.aliens.dms.android.core.designsystem.ContainedButton -import team.aliens.dms.android.core.designsystem.Scaffold +import team.aliens.dms.android.core.designsystem.DmsIcon import team.aliens.dms.android.core.designsystem.DmsTheme import team.aliens.dms.android.core.designsystem.DmsTopAppBar import team.aliens.dms.android.core.designsystem.RoundedButton -import team.aliens.dms.android.core.designsystem.ShadowDefaults -import team.aliens.dms.android.core.designsystem.clickable +import team.aliens.dms.android.core.designsystem.Scaffold import team.aliens.dms.android.core.designsystem.VerticallyFadedLazyColumn +import team.aliens.dms.android.core.designsystem.clickable import team.aliens.dms.android.core.designsystem.shadow import team.aliens.dms.android.core.ui.DefaultHorizontalSpace import team.aliens.dms.android.core.ui.PaddingDefaults @@ -73,7 +73,7 @@ internal fun RemainsApplicationScreen( navigationIcon = { IconButton(onClick = navigator::navigateUp) { Icon( - painter = painterResource(id = R.drawable.ic_baseline_arrow_back_24), + painter = painterResource(id = DmsIcon.Back), contentDescription = stringResource(id = R.string.top_bar_back_button), ) } From bff97a8e8c0e8e2730d40e88d2198d3ae55c1a99 Mon Sep 17 00:00:00 2001 From: uiel Date: Fri, 7 Jun 2024 15:03:56 +0900 Subject: [PATCH 08/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/application/ApplicationScreen.kt | 43 +++++++++++-------- .../main/application/ApplicationViewModel.kt | 14 ++++-- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt index 405444822..e8654a26d 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt @@ -18,12 +18,16 @@ import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.res.stringResource import androidx.hilt.navigation.compose.hiltViewModel +import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle +import androidx.lifecycle.withResumed import com.ramcosta.composedestinations.annotation.Destination import team.aliens.dms.android.core.designsystem.ContainedButton import team.aliens.dms.android.core.designsystem.DmsTheme @@ -53,6 +57,8 @@ internal fun ApplicationScreen( val viewModel: ApplicationViewModel = hiltViewModel() val uiState by viewModel.stateFlow.collectAsStateWithLifecycle() + LocalLifecycleOwner.current.lifecycle.addObserver(viewModel) + Scaffold( modifier = modifier, topBar = { @@ -137,25 +143,24 @@ private fun ApplicationCard( color = DmsTheme.colorScheme.onSurface, style = DmsTheme.typography.title2, ) - // TODO: 태그 업데이트 로직 추가 -// AnimatedVisibility( -// visible = appliedTitle != null, -// enter = slideInVertically() + fadeIn(), -// exit = slideOutVertically() + fadeOut(), -// ) { -// if (appliedTitle != null) { -// RoundedButton( -// onClick = {}, -// fillMinSize = false, -// contentPadding = PaddingValues( -// horizontal = PaddingDefaults.Medium, -// vertical = PaddingDefaults.Small, -// ), -// ) { -// Text(text = appliedTitle) -// } -// } -// } + AnimatedVisibility( + visible = appliedTitle != null, + enter = slideInVertically() + fadeIn(), + exit = slideOutVertically() + fadeOut(), + ) { + if (appliedTitle != null) { + RoundedButton( + onClick = {}, + fillMinSize = false, + contentPadding = PaddingValues( + horizontal = PaddingDefaults.Medium, + vertical = PaddingDefaults.Small, + ), + ) { + Text(text = appliedTitle) + } + } + } } Text( modifier = Modifier diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt index cf246b9c5..2f5bfc27a 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt @@ -1,5 +1,7 @@ package team.aliens.dms.android.feature.main.application +import androidx.lifecycle.DefaultLifecycleObserver +import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers @@ -20,10 +22,14 @@ internal class ApplicationViewModel @Inject constructor( private val remainsRepository: RemainsRepository, ) : BaseMviViewModel( initialState = ApplicationUiState.initial(), -) { - init { - fetchAppliedStudyRoom() - fetchAppliedRemainsOption() +), DefaultLifecycleObserver { + + override fun onCreate(owner: LifecycleOwner) { + super.onCreate(owner) + viewModelScope.launch { + fetchAppliedStudyRoom() + fetchAppliedRemainsOption() + } } private fun fetchAppliedStudyRoom() { From 8c7bbf3740ff6ab8ad3c55fe48a2f9d4155eff63 Mon Sep 17 00:00:00 2001 From: uiel Date: Fri, 7 Jun 2024 16:21:13 +0900 Subject: [PATCH 09/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=ED=95=99?= =?UTF-8?q?=EA=B5=90=20=EC=9D=B8=EC=A6=9D=20=EC=BD=94=EB=93=9C=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=EC=9C=BC=EB=A1=9C=20=EB=84=98=EA=B8=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signup/1_EnterSchoolVerificationCodeScreen.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/signup/1_EnterSchoolVerificationCodeScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/signup/1_EnterSchoolVerificationCodeScreen.kt index e25a72aad..df4eb2c76 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/signup/1_EnterSchoolVerificationCodeScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/signup/1_EnterSchoolVerificationCodeScreen.kt @@ -11,6 +11,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -19,9 +20,10 @@ import androidx.compose.ui.res.stringResource import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.ramcosta.composedestinations.annotation.Destination import team.aliens.dms.android.core.designsystem.ContainedButton -import team.aliens.dms.android.core.designsystem.Scaffold +import team.aliens.dms.android.core.designsystem.DmsIcon import team.aliens.dms.android.core.designsystem.DmsTopAppBar import team.aliens.dms.android.core.designsystem.LocalToast +import team.aliens.dms.android.core.designsystem.Scaffold import team.aliens.dms.android.core.designsystem.VerificationCodeInput import team.aliens.dms.android.core.designsystem.VerificationCodeInputDefaults import team.aliens.dms.android.core.ui.Banner @@ -46,6 +48,12 @@ internal fun EnterSchoolVerificationCodeScreen( val toast = LocalToast.current val context = LocalContext.current + LaunchedEffect(uiState.schoolVerificationCode) { + if (uiState.schoolVerificationCode.length == SignUpViewModel.SCHOOL_VERIFICATION_CODE_LENGTH) { + viewModel.postIntent(SignUpIntent.ExamineSchoolVerificationCode) + } + } + viewModel.sideEffectFlow.collectInLaunchedEffectWithLifecycle { sideEffect -> when (sideEffect) { SignUpSideEffect.SchoolVerificationCodeExamined -> navigator.openEnterSchoolVerificationQuestion() @@ -66,7 +74,7 @@ internal fun EnterSchoolVerificationCodeScreen( navigationIcon = { IconButton(onClick = navigator::navigateUp) { Icon( - painter = painterResource(id = R.drawable.ic_baseline_arrow_back_24), + painter = painterResource(id = DmsIcon.Back), contentDescription = stringResource(id = R.string.top_bar_back_button), ) } From 253b01d7293f7b69b2c221c36c9612e694d45f6c Mon Sep 17 00:00:00 2001 From: uiel Date: Fri, 7 Jun 2024 16:21:32 +0900 Subject: [PATCH 10/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=9D=B4?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=20=EC=9D=B8=EC=A6=9D=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=EC=9C=BC=EB=A1=9C=20=EB=84=98=EA=B8=B0?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/signup/4_EnterEmailVerificationCodeScreen.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/signup/4_EnterEmailVerificationCodeScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/signup/4_EnterEmailVerificationCodeScreen.kt index 488648c35..c842e94aa 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/signup/4_EnterEmailVerificationCodeScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/signup/4_EnterEmailVerificationCodeScreen.kt @@ -27,6 +27,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.ramcosta.composedestinations.annotation.Destination import team.aliens.dms.android.core.designsystem.ButtonDefaults import team.aliens.dms.android.core.designsystem.ContainedButton +import team.aliens.dms.android.core.designsystem.DmsIcon import team.aliens.dms.android.core.designsystem.Scaffold import team.aliens.dms.android.core.designsystem.DmsTheme import team.aliens.dms.android.core.designsystem.DmsTopAppBar @@ -79,6 +80,12 @@ internal fun SignUpEnterEmailVerificationCodeScreen( } } + LaunchedEffect(uiState.emailVerificationCode) { + if (uiState.emailVerificationCode.length == SignUpViewModel.EMAIL_VERIFICATION_CODE_LENGTH) { + viewModel.postIntent(SignUpIntent.CheckEmailVerificationCode) + } + } + LaunchedEffect(uiState.sessionId) { timer.start() } @@ -122,7 +129,7 @@ internal fun SignUpEnterEmailVerificationCodeScreen( navigationIcon = { IconButton(onClick = navigator::popUpToEnterEmail) { Icon( - painter = painterResource(id = R.drawable.ic_baseline_arrow_back_24), + painter = painterResource(id = DmsIcon.Back), contentDescription = stringResource(id = R.string.top_bar_back_button), ) } From 37a66b817ec61087d5c48f52fb85766cda55c777 Mon Sep 17 00:00:00 2001 From: uiel Date: Fri, 7 Jun 2024 16:42:24 +0900 Subject: [PATCH 11/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EB=94=94=20=EC=84=A4=EC=A0=95=20=ED=95=99=EB=B2=88=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/feature/signup/5_SetIdScreen.kt | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/signup/5_SetIdScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/signup/5_SetIdScreen.kt index 52a78e00c..4c88943c3 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/signup/5_SetIdScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/signup/5_SetIdScreen.kt @@ -26,6 +26,8 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource @@ -77,6 +79,9 @@ internal fun SetIdScreen( val toast = LocalToast.current val context = LocalContext.current + val classFocusRequest = remember { FocusRequester() } + val numberFocusRequest = remember { FocusRequester() } + val (studentConfirmed, onStudentConfirmedChange) = remember { mutableStateOf(false) } val (gradeClassNumberError, setGradeClassNumberError) = remember { mutableStateOf(false) } @@ -165,10 +170,14 @@ internal fun SetIdScreen( horizontalArrangement = Arrangement.spacedBy(DefaultHorizontalSpace), ) { TextField( - modifier = Modifier.weight(1f), + modifier = Modifier + .weight(1f), value = uiState.grade, hint = { Text(text = stringResource(id = R.string.sign_up_set_id_hint_grade)) }, - onValueChange = { viewModel.postIntent(SignUpIntent.UpdateGrade(value = it)) }, + onValueChange = { grade -> + viewModel.postIntent(SignUpIntent.UpdateGrade(value = grade)) + if (grade.isNotEmpty()) classFocusRequest.requestFocus() + }, supportingText = {}, isError = gradeClassNumberError, enabled = !studentConfirmed, @@ -178,10 +187,15 @@ internal fun SetIdScreen( ), ) TextField( - modifier = Modifier.weight(1f), + modifier = Modifier + .weight(1f) + .focusRequester(classFocusRequest), value = uiState.classroom, hint = { Text(text = stringResource(id = R.string.sign_up_set_id_hint_class)) }, - onValueChange = { viewModel.postIntent(SignUpIntent.UpdateClass(value = it)) }, + onValueChange = { classRoom -> + viewModel.postIntent(SignUpIntent.UpdateClass(value = classRoom)) + if (classRoom.isNotEmpty()) numberFocusRequest.requestFocus() + }, supportingText = {}, isError = gradeClassNumberError, enabled = !studentConfirmed, @@ -191,7 +205,9 @@ internal fun SetIdScreen( ), ) TextField( - modifier = Modifier.weight(1f), + modifier = Modifier + .weight(1f) + .focusRequester(numberFocusRequest), value = uiState.number, hint = { Text(text = stringResource(id = R.string.sign_up_set_id_hint_number)) }, onValueChange = { viewModel.postIntent(SignUpIntent.UpdateNumber(value = it)) }, From a9889227a4943450f9f0298f457079ceb866d2a7 Mon Sep 17 00:00:00 2001 From: uiel Date: Sat, 8 Jun 2024 17:12:35 +0900 Subject: [PATCH 12/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3f2c3ce6e..efd848904 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ accompanist = "0.34.0" androidx-window = "1.3.0-alpha02" activity = "1.8.2" appcompat = "1.6.1" -appUpdateKtx = "2.1.0" +appUpdate = "2.1.0" core = "1.12.0" datastorePreferences = "1.0.0" espresso = "3.5.1" @@ -59,7 +59,7 @@ androidx-compose-material = { group = "androidx.compose.material3", name = "mate androidx-compose-material-window = { group = "androidx.compose.material3", name = "material3-window-size-class-android", version.ref = "materialCompose" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" } androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigation" } -app-update-ktx = { module = "com.google.android.play:app-update-ktx", version.ref = "appUpdateKtx" } +app-update-ktx = { module = "com.google.android.play:app-update", version.ref = "appUpdate" } composeDestinations = { group = "io.github.raamcosta.compose-destinations", name = "animations-core", version.ref = "composeDestination" } composeDestinations-ksp = { group = "io.github.raamcosta.compose-destinations", name = "ksp", version.ref = "composeDestination" } javax-inject = { module = "javax.inject:javax.inject", version.ref = "javaxInject" } From 12ed49095f9de48d07d55608d2ba7a3c39e65354 Mon Sep 17 00:00:00 2001 From: uiel Date: Sat, 8 Jun 2024 17:52:01 +0900 Subject: [PATCH 13/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20string=20resour?= =?UTF-8?q?ce=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/announcement/AnnouncementListScreen.kt | 9 ++++++++- .../android/feature/notice/NoticeDetailsScreen.kt | 13 ++++++++++--- feature/src/main/res/values/strings.xml | 2 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/announcement/AnnouncementListScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/announcement/AnnouncementListScreen.kt index c3d97aa95..ca1d4eaea 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/announcement/AnnouncementListScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/announcement/AnnouncementListScreen.kt @@ -181,4 +181,11 @@ private fun NoticeCard( } private val LocalDateTime.text: String - @Composable inline get() = "${this.year}-${this.monthValue}-${this.dayOfMonth} ${this.hour}:${this.minute}" + @Composable inline get() = stringResource( + id = R.string.format_notice_time, + this.year, + this.monthValue, + this.dayOfMonth, + this.hour, + this.minute, + ) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt index 8af053fd4..05541a3d1 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.kt @@ -89,7 +89,7 @@ internal fun NoticeDetailsScreen( modifier = Modifier .fillMaxWidth() .horizontalPadding(), - text = uiState.createdAt.text, + text = uiState.createdAt!!.text, style = DmsTheme.typography.caption, color = DmsTheme.colorScheme.onSurfaceVariant, ) @@ -127,6 +127,13 @@ internal fun NoticeDetailsScreen( } } -private val LocalDateTime?.text: String - @Composable inline get() = "${this?.year}-${this?.monthValue}-${this?.dayOfMonth} ${this?.hour}:${this?.minute}" +private val LocalDateTime.text: String + @Composable inline get() = stringResource( + id = R.string.format_notice_time, + this.year, + this.monthValue, + this.dayOfMonth, + this.hour, + this.minute, + ) diff --git a/feature/src/main/res/values/strings.xml b/feature/src/main/res/values/strings.xml index 52108e59c..c3b6a9ad7 100644 --- a/feature/src/main/res/values/strings.xml +++ b/feature/src/main/res/values/strings.xml @@ -201,6 +201,8 @@ 새로운 공지사항이 있습니다 공지사항이 없습니다 + + %d/%d/%d %d:%d 로그아웃 From e272a177a689e82faa357a2320e072092acb4d27 Mon Sep 17 00:00:00 2001 From: uiel Date: Mon, 10 Jun 2024 08:41:39 +0900 Subject: [PATCH 14/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c86233b8d..d317d8683 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -122,5 +122,5 @@ dependencies { testImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.junit) - implementation(libs.app.update.ktx) + implementation(libs.app.update) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index efd848904..1d7124e6f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -59,7 +59,7 @@ androidx-compose-material = { group = "androidx.compose.material3", name = "mate androidx-compose-material-window = { group = "androidx.compose.material3", name = "material3-window-size-class-android", version.ref = "materialCompose" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" } androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigation" } -app-update-ktx = { module = "com.google.android.play:app-update", version.ref = "appUpdate" } +app-update = { module = "com.google.android.play:app-update-ktx", version.ref = "appUpdate" } composeDestinations = { group = "io.github.raamcosta.compose-destinations", name = "animations-core", version.ref = "composeDestination" } composeDestinations-ksp = { group = "io.github.raamcosta.compose-destinations", name = "ksp", version.ref = "composeDestination" } javax-inject = { module = "javax.inject:javax.inject", version.ref = "javaxInject" } From ea412a7d5a3c66086744698c3fd07f0b35713ab8 Mon Sep 17 00:00:00 2001 From: uiel Date: Mon, 10 Jun 2024 16:02:00 +0900 Subject: [PATCH 15/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20null=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/application/ApplicationScreen.kt | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt index e8654a26d..a15f6c74e 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt @@ -148,17 +148,15 @@ private fun ApplicationCard( enter = slideInVertically() + fadeIn(), exit = slideOutVertically() + fadeOut(), ) { - if (appliedTitle != null) { - RoundedButton( - onClick = {}, - fillMinSize = false, - contentPadding = PaddingValues( - horizontal = PaddingDefaults.Medium, - vertical = PaddingDefaults.Small, - ), - ) { - Text(text = appliedTitle) - } + RoundedButton( + onClick = { }, + fillMinSize = false, + contentPadding = PaddingValues( + horizontal = PaddingDefaults.Medium, + vertical = PaddingDefaults.Small, + ), + ) { + Text(text = appliedTitle!!) } } } From 5ed7c99ac9a45f7479b78736df4e5ab607b7dd7e Mon Sep 17 00:00:00 2001 From: uielPark Date: Mon, 10 Jun 2024 23:43:19 +0900 Subject: [PATCH 16/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20null=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/application/ApplicationScreen.kt | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt index a15f6c74e..d3b27c40a 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt @@ -148,15 +148,17 @@ private fun ApplicationCard( enter = slideInVertically() + fadeIn(), exit = slideOutVertically() + fadeOut(), ) { - RoundedButton( - onClick = { }, - fillMinSize = false, - contentPadding = PaddingValues( - horizontal = PaddingDefaults.Medium, - vertical = PaddingDefaults.Small, - ), - ) { - Text(text = appliedTitle!!) + if(appliedTitle!= null) { + RoundedButton( + onClick = { }, + fillMinSize = false, + contentPadding = PaddingValues( + horizontal = PaddingDefaults.Medium, + vertical = PaddingDefaults.Small, + ), + ) { + Text(text = appliedTitle) + } } } } From 6f30327cab222d4ee189e4e3fc91447f9839c98e Mon Sep 17 00:00:00 2001 From: uielPark Date: Wed, 12 Jun 2024 11:49:11 +0900 Subject: [PATCH 17/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dms/android/feature/main/application/ApplicationViewModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt index 2f5bfc27a..8d6da6eca 100644 --- a/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt +++ b/feature/src/main/java/team/aliens/dms/android/feature/main/application/ApplicationViewModel.kt @@ -26,6 +26,7 @@ internal class ApplicationViewModel @Inject constructor( override fun onCreate(owner: LifecycleOwner) { super.onCreate(owner) + // TODO: onDispose를 이용하여 이벤트 넘기기 viewModelScope.launch { fetchAppliedStudyRoom() fetchAppliedRemainsOption() From 50d491fe010279c799c494d0e33b6b60a7ed039e Mon Sep 17 00:00:00 2001 From: uiel Date: Thu, 13 Jun 2024 23:21:33 +0900 Subject: [PATCH 18/18] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f11047436..14d6b8248 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,8 +17,8 @@ android { minSdk = libs.versions.minSdk.get().toInt() targetSdk = libs.versions.targetSdk.get().toInt() - versionCode = 14 - versionName = "1.3.5" + versionCode = 15 + versionName = "1.3.6" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }