From a8731c0210c7dbf650e6da7eb5ae907f52031760 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Tue, 17 Sep 2024 15:14:57 -0700 Subject: [PATCH] remove thread button now that we have note hitboxes Signed-off-by: William Casarin --- src/ui/note/mod.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/ui/note/mod.rs b/src/ui/note/mod.rs index 99b33b6..cf4cc69 100644 --- a/src/ui/note/mod.rs +++ b/src/ui/note/mod.rs @@ -552,12 +552,9 @@ fn render_note_actionbar( ) -> egui::InnerResponse> { ui.horizontal(|ui| { let reply_resp = reply_button(ui, note_key); - let thread_resp = thread_button(ui, note_key); if reply_resp.clicked() { Some(BarAction::Reply(NoteId::new(*note_id))) - } else if thread_resp.clicked() { - Some(BarAction::OpenThread(NoteId::new(*note_id))) } else { None } @@ -610,29 +607,6 @@ fn reply_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response { resp.union(put_resp) } -fn thread_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response { - let id = ui.id().with(("thread_anim", note_key)); - let size = 8.0; - let expand_size = 5.0; - let anim_speed = 0.05; - - let (rect, size, resp) = ui::anim::hover_expand(ui, id, size, expand_size, anim_speed); - - let color = if ui.style().visuals.dark_mode { - egui::Color32::WHITE - } else { - egui::Color32::BLACK - }; - - ui.painter_at(rect).circle_stroke( - rect.center(), - (size - 1.0) / 2.0, - egui::Stroke::new(1.0, color), - ); - - resp -} - fn repost_icon() -> egui::Image<'static> { let img_data = egui::include_image!("../../../assets/icons/repost_icon_4x.png"); egui::Image::new(img_data)