actionbar: move BarAction and add execute method
We will be executing baractions in multiple places, so factor this out. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -17,7 +17,7 @@ pub use account_switcher::AccountSelectionWidget;
|
||||
pub use fixed_window::{FixedWindow, FixedWindowResponse};
|
||||
pub use global_popup::DesktopGlobalPopup;
|
||||
pub use mention::Mention;
|
||||
pub use note::{BarAction, NoteResponse, NoteView, PostReplyView, PostView};
|
||||
pub use note::{NoteResponse, NoteView, PostReplyView, PostView};
|
||||
pub use preview::{Preview, PreviewApp, PreviewConfig};
|
||||
pub use profile::{profile_preview_controller, ProfilePic, ProfilePreview};
|
||||
pub use relay::RelayView;
|
||||
|
||||
@@ -8,7 +8,7 @@ pub use options::NoteOptions;
|
||||
pub use post::{PostAction, PostResponse, PostView};
|
||||
pub use reply::PostReplyView;
|
||||
|
||||
use crate::{colors, notecache::CachedNote, ui, ui::View, Damus};
|
||||
use crate::{actionbar::BarAction, colors, notecache::CachedNote, ui, ui::View, Damus};
|
||||
use egui::{Label, RichText, Sense};
|
||||
use nostrdb::{Note, NoteKey, NoteReply, Transaction};
|
||||
|
||||
@@ -368,11 +368,6 @@ impl<'a> NoteView<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
|
||||
pub enum BarAction {
|
||||
Reply,
|
||||
}
|
||||
|
||||
fn render_note_actionbar(
|
||||
ui: &mut egui::Ui,
|
||||
note_key: NoteKey,
|
||||
|
||||
Reference in New Issue
Block a user