diff --git a/src/ui/note/post.rs b/src/ui/note/post.rs index 1308c17..660c5a6 100644 --- a/src/ui/note/post.rs +++ b/src/ui/note/post.rs @@ -208,8 +208,16 @@ impl<'a> PostView<'a> { } ui.with_layout(egui::Layout::right_to_left(egui::Align::BOTTOM), |ui| { + if self.draft.buffer.is_empty() { + // Don't render button if our buffer is empty + return None; + } + if ui - .add_sized([91.0, 32.0], egui::Button::new("Post now")) + .add_sized( + [91.0, 32.0], + egui::Button::new("Post now") + ) .clicked() { let new_post = NewPost::new(