From 8d76b7be57393bd4e57792b5f4be2fd70a5d2b49 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Wed, 25 Sep 2024 15:16:56 +0900 Subject: [PATCH] [fix/#841] delete dialog StringResources --- .../feature/mypage/component/MyPageDialog.kt | 27 +++++++++---------- .../feature/mypage/mypage/MyPageActivity.kt | 17 ++++++------ .../mypage/src/main/res/values/strings.xml | 8 ------ 3 files changed, 20 insertions(+), 32 deletions(-) diff --git a/feature/mypage/src/main/java/org/sopt/official/feature/mypage/component/MyPageDialog.kt b/feature/mypage/src/main/java/org/sopt/official/feature/mypage/component/MyPageDialog.kt index f95a5667..53d6b9e8 100644 --- a/feature/mypage/src/main/java/org/sopt/official/feature/mypage/component/MyPageDialog.kt +++ b/feature/mypage/src/main/java/org/sopt/official/feature/mypage/component/MyPageDialog.kt @@ -24,7 +24,6 @@ */ package org.sopt.official.feature.mypage.component -import androidx.annotation.StringRes import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -38,7 +37,6 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -50,15 +48,14 @@ import org.sopt.official.designsystem.Gray600 import org.sopt.official.designsystem.Gray700 import org.sopt.official.designsystem.SoptTheme import org.sopt.official.designsystem.White -import org.sopt.official.feature.mypage.R @Composable fun MyPageDialog( onDismissRequest: () -> Unit, - @StringRes title: Int, - @StringRes subTitle: Int, - @StringRes negativeText: Int, - @StringRes positiveText: Int, + title: String, + subTitle: String, + negativeText: String, + positiveText: String, modifier: Modifier = Modifier, properties: DialogProperties = DialogProperties(usePlatformDefaultWidth = false), onPositiveButtonClick: () -> Unit = {} @@ -78,13 +75,13 @@ fun MyPageDialog( horizontalAlignment = Alignment.CenterHorizontally, ) { Text( - text = stringResource(id = title), + text = title, color = White, style = SoptTheme.typography.heading16B ) Spacer(modifier = Modifier.height(28.dp)) Text( - text = stringResource(id = subTitle), + text = subTitle, color = Gray100, style = SoptTheme.typography.body14M, textAlign = TextAlign.Center, @@ -104,7 +101,7 @@ fun MyPageDialog( contentColor = Gray10, ) { Text( - text = stringResource(negativeText), + text = negativeText, style = SoptTheme.typography.body14M ) } @@ -114,7 +111,7 @@ fun MyPageDialog( onClick = onPositiveButtonClick, ) { Text( - text = stringResource(positiveText), + text = positiveText, style = SoptTheme.typography.body14M ) } @@ -129,10 +126,10 @@ fun MyPageDialogPreview() { SoptTheme { MyPageDialog( onDismissRequest = {}, - title = R.string.mypage_alert_soptamp_reset_title, - subTitle = R.string.mypage_alert_soptamp_reset_subtitle, - negativeText = R.string.mypage_alert_soptamp_reset_negative, - positiveText = R.string.mypage_alert_soptamp_reset_positive + title = "미션을 초기화 하실건가요?", + subTitle = "사진, 메모가 삭제되고\n전체 미션이 미완료상태로 초기화됩니다.", + negativeText = "취소", + positiveText = "초기화" ) } } diff --git a/feature/mypage/src/main/java/org/sopt/official/feature/mypage/mypage/MyPageActivity.kt b/feature/mypage/src/main/java/org/sopt/official/feature/mypage/mypage/MyPageActivity.kt index 9a122b28..901a0a06 100644 --- a/feature/mypage/src/main/java/org/sopt/official/feature/mypage/mypage/MyPageActivity.kt +++ b/feature/mypage/src/main/java/org/sopt/official/feature/mypage/mypage/MyPageActivity.kt @@ -58,7 +58,6 @@ import org.sopt.official.auth.model.UserActiveState import org.sopt.official.common.navigator.NavigatorProvider import org.sopt.official.common.util.serializableExtra import org.sopt.official.designsystem.SoptTheme -import org.sopt.official.feature.mypage.R import org.sopt.official.feature.mypage.component.MyPageDialog import org.sopt.official.feature.mypage.component.MyPageSection import org.sopt.official.feature.mypage.component.MyPageTopBar @@ -249,10 +248,10 @@ private fun ShowMyPageDialog( MyPageAction.CLEAR_SOPTAMP -> { MyPageDialog( onDismissRequest = onDismissRequest, - title = R.string.mypage_alert_soptamp_reset_title, - subTitle = R.string.mypage_alert_soptamp_reset_subtitle, - negativeText = R.string.mypage_alert_soptamp_reset_negative, - positiveText = R.string.mypage_alert_soptamp_reset_positive, + title = "미션을 초기화 하실건가요?", + subTitle = "사진, 메모가 삭제되고\n전체 미션이 미완료상태로 초기화됩니다.", + negativeText = "취소", + positiveText = "초기화", onPositiveButtonClick = onClearSoptampClick ) } @@ -260,10 +259,10 @@ private fun ShowMyPageDialog( MyPageAction.LOGOUT -> { MyPageDialog( onDismissRequest = onDismissRequest, - title = R.string.mypage_alert_log_out_title, - subTitle = R.string.mypage_alert_log_out_subtitle, - negativeText = R.string.mypage_alert_log_out_negative, - positiveText = R.string.mypage_alert_log_out_positive, + title = "로그아웃", + subTitle = "정말 로그아웃을 하실 건가요?", + negativeText = "취소", + positiveText = "로그아웃", onPositiveButtonClick = onLogoutClick ) } diff --git a/feature/mypage/src/main/res/values/strings.xml b/feature/mypage/src/main/res/values/strings.xml index fe0e9a2f..35125c01 100644 --- a/feature/mypage/src/main/res/values/strings.xml +++ b/feature/mypage/src/main/res/values/strings.xml @@ -26,14 +26,6 @@ 마이페이지 닉네임 변경 - 미션을 초기화 하실건가요? - 사진, 메모가 삭제되고\n전체 미션이 미완료상태로 초기화됩니다. - 초기화 - 취소 - 로그아웃 - 정말 로그아웃을 하실 건가요? - 로그아웃 - 취소 탈퇴하기