summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-20 22:09:03 +0300
committerVika <vika@fireburn.ru>2024-08-20 22:09:03 +0300
commitbd01af416055cffed8a36bf2cba0073c9cb289f3 (patch)
tree476c47f8766c28299c21afc89ef7266e46b0bcee
parent56c4714da77aa710bc8187ef0f06eb38e238ecb5 (diff)
downloadbowl-bd01af416055cffed8a36bf2cba0073c9cb289f3.tar.zst
Don't submit empty posts
-rw-r--r--src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ce90fec..015f230 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -371,6 +371,10 @@ impl AsyncComponent for PostComposerModel {
                 self.summary_buffer.insert_text(self.summary_buffer.length(), text);
             },
             PostComposerInput::Submit => {
+                if self.content_buffer.char_count() == 0 {
+                    self.update_view(widgets, sender);
+                    return
+                }
                 self.set_submit_busy_guard(
                     Some(relm4::main_adw_application().mark_busy())
                 );