fix: blank text check
This commit is contained in:
parent
fa659c7da0
commit
6e3a3bb6f8
2 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -984,4 +984,5 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
|||
<string name="create_new_review">Create New Review</string>
|
||||
<string name="create">Create</string>
|
||||
<string name="preview">Preview</string>
|
||||
<string name="cannot_be_empty">Text cannot be empty</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue