diff --git a/android/app/src/main/java/com/now/naaga/presentation/onadventure/OnAdventureActivity.kt b/android/app/src/main/java/com/now/naaga/presentation/onadventure/OnAdventureActivity.kt
index 95acee13e..83b59aa89 100644
--- a/android/app/src/main/java/com/now/naaga/presentation/onadventure/OnAdventureActivity.kt
+++ b/android/app/src/main/java/com/now/naaga/presentation/onadventure/OnAdventureActivity.kt
@@ -103,7 +103,7 @@ class OnAdventureActivity :
viewModel.endAdventure()
}
binding.ivSendLetter.setOnClickListener {
- LetterSendDialog(viewModel::sendLetter).show(supportFragmentManager, LetterSendDialog.TAG)
+ LetterSendDialog(::registerLetter).show(supportFragmentManager, LetterSendDialog.TAG)
}
}
@@ -203,6 +203,14 @@ class OnAdventureActivity :
}
}
+ private fun registerLetter(message: String) {
+ if (message.isNotEmpty()) {
+ viewModel.sendLetter(message)
+ } else {
+ showToast(getString(R.string.send_letter_dialog_warning))
+ }
+ }
+
private fun showGiveUpDialog() {
val fragment: Fragment? = supportFragmentManager.findFragmentByTag(GIVE_UP)
if (fragment == null) {
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 24a77863a..13fb026cb 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -146,6 +146,7 @@
이 곳에 내용을 작성해주세요!
+ 내용을 1자 이상 입력해주세요!
전송하기