From 5eaca62af8df9aaf35b319292220e506c268967e Mon Sep 17 00:00:00 2001 From: MinseoShindor Date: Sat, 17 Feb 2024 01:41:55 +0900 Subject: [PATCH] =?UTF-8?q?[fix/#158]=20=EB=AA=A8=EC=9E=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=204=EC=9E=90=EB=A6=AC=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/presentation/moim/MoimModifyFragment.kt | 1 + .../teumteum/teumteum/presentation/moim/MoimViewModel.kt | 8 +++++--- app/src/main/res/values/strings.xml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimModifyFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimModifyFragment.kt index b2e5887b..69c2221b 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimModifyFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimModifyFragment.kt @@ -62,6 +62,7 @@ class MoimModifyFragment: BindingFragment(R.layout.fr ScreenState.Server -> { context?.defaultToast(getString(R.string.moim_alert_message_server)) } ScreenState.DeleteSuccess -> {context?.defaultToast(getString(R.string.setting_dialog_moim_delete_success))} ScreenState.Success -> {context?.defaultToast(getString(R.string.moim_alert_message_modify_success))} + ScreenState.ModifyFailure -> {context?.defaultToast(getString(R.string.setting_dialog_moim_modify_failure))} else -> {} } } diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimViewModel.kt b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimViewModel.kt index 29ca93f4..8e3ffa70 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimViewModel.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimViewModel.kt @@ -299,7 +299,9 @@ class MoimViewModel @Inject constructor( return try { val currentYear = Year.now().value val dateInput = if(_date.value.length == 4) { - "${currentYear}${_date.value}" + val month = _date.value.substring(0, 2) + val day = _date.value.substring(2) + "${currentYear}년 ${month}월 ${day}일" } else { "${currentYear}년 ${_date.value.substring(0, _date.value.lastIndexOf(" "))}" } @@ -490,7 +492,7 @@ class MoimViewModel @Inject constructor( } } } else { - _screenState.value = ScreenState.Failure + _screenState.value = ScreenState.ModifyFailure } } } @@ -668,7 +670,7 @@ class MoimViewModel @Inject constructor( enum class ScreenState { Topic, Name, Introduce, DateTime, Address, People, Create, Success, Failure, Server, - CancelInit, Cancel, CancelSuccess, Finish, DeleteInit, Delete, DeleteSuccess, + CancelInit, Cancel, CancelSuccess, Finish, DeleteInit, Delete, DeleteSuccess, ModifyFailure, Modify, Webview, ReportInit, Report, ReportSuccess, BookMarkSuccess, BookMarkDelete, } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ac95967c..2e263a4e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -208,6 +208,7 @@ 수정하기 모임 삭제를 성공했습니다 모임 삭제에 오류가 발생했습니다 + 모임 수정에 오류가 발생했습니다 탈퇴하는 이유가 무엇인가요? 선택 완료