diff options
author | Vika <vika@fireburn.ru> | 2024-08-20 22:09:03 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-20 22:09:03 +0300 |
commit | bd01af416055cffed8a36bf2cba0073c9cb289f3 (patch) | |
tree | 476c47f8766c28299c21afc89ef7266e46b0bcee | |
parent | 56c4714da77aa710bc8187ef0f06eb38e238ecb5 (diff) | |
download | bowl-bd01af416055cffed8a36bf2cba0073c9cb289f3.tar.zst |
Don't submit empty posts
-rw-r--r-- | src/lib.rs | 4 |
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()) ); |