diff --git a/domain/src/main/java/com/whyranoid/domain/model/Rule.kt b/domain/src/main/java/com/whyranoid/domain/model/Rule.kt index b233f036..a86dccd9 100644 --- a/domain/src/main/java/com/whyranoid/domain/model/Rule.kt +++ b/domain/src/main/java/com/whyranoid/domain/model/Rule.kt @@ -6,7 +6,7 @@ data class Rule( val minute: Int ) { override fun toString(): String { - return "${dayOfWeek.dayResId}요일${hour}시${minute}분" + return "${dayOfWeek.dayResId}-$hour-$minute" } } diff --git a/presentation/src/main/java/com/whyranoid/presentation/community/group/create/CreateGroupViewModel.kt b/presentation/src/main/java/com/whyranoid/presentation/community/group/create/CreateGroupViewModel.kt index 65a65bd6..1db23b5e 100644 --- a/presentation/src/main/java/com/whyranoid/presentation/community/group/create/CreateGroupViewModel.kt +++ b/presentation/src/main/java/com/whyranoid/presentation/community/group/create/CreateGroupViewModel.kt @@ -39,7 +39,10 @@ class CreateGroupViewModel @Inject constructor( } fun onDialogConfirm(date: String, hour: String, minute: String) { - rules.value = rules.value + listOf("$date-$hour-$minute") + if (date.isNotEmpty() && hour.isNotEmpty() && minute.isNotEmpty()) { + rules.value = rules.value + listOf("$date-$hour-$minute") + } + _showDialog.value = false }