hashtags: click hashtags to open them

Fixes: https://github.com/damus-io/notedeck/issues/695
Fixes: https://github.com/damus-io/notedeck/issues/713
Changelog-Added: Add ability to click hashtags
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-02-05 18:43:09 -08:00
parent 0cc1d8a600
commit ac10c7e5b2
6 changed files with 44 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
use crate::ui;
use crate::{actionbar::NoteAction, profile::get_display_name};
use crate::{actionbar::NoteAction, profile::get_display_name, timeline::TimelineKind};
use egui::Sense;
use enostr::Pubkey;
use nostrdb::{Ndb, Transaction};
@@ -89,7 +89,9 @@ fn mention_ui(
let note_action = if resp.clicked() {
ui::show_pointer(ui);
Some(NoteAction::OpenProfile(Pubkey::new(*pk)))
Some(NoteAction::OpenTimeline(TimelineKind::profile(
Pubkey::new(*pk),
)))
} else if resp.hovered() {
ui::show_pointer(ui);
None