remove thread button

now that we have note hitboxes

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2024-09-17 15:14:57 -07:00
parent e16eeb4d1b
commit a8731c0210

View File

@ -552,12 +552,9 @@ fn render_note_actionbar(
) -> egui::InnerResponse<Option<BarAction>> {
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)