fix: blank text check

This commit is contained in:
rebelonion 2024-05-12 08:19:12 -05:00
parent fa659c7da0
commit 6e3a3bb6f8
2 changed files with 5 additions and 0 deletions

View file

@ -65,6 +65,10 @@ class MarkdownCreatorActivity : AppCompatActivity() {
}
binding.createButton.setOnClickListener {
if (text.isBlank()) {
toast(getString(R.string.cannot_be_empty))
return@setOnClickListener
}
launchIO {
val success = when (type) {
"activity" -> Anilist.mutation.postActivity(text)