Merge right click paste #507

jglad (1):
      #507 add right click paste in search
This commit is contained in:
William Casarin
2025-03-21 16:46:31 -07:00
8 changed files with 38 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ sha2 = { workspace = true }
bincode = { workspace = true }
ehttp = {workspace = true }
mime_guess = { workspace = true }
egui-winit = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }

View File

@@ -4,6 +4,7 @@ use crate::{
KeyStorageType, NoteCache, RelayDebugView, ThemeHandler, UnknownIds,
};
use egui::ThemePreference;
use egui_winit::clipboard::Clipboard;
use enostr::RelayPool;
use nostrdb::{Config, Ndb, Transaction};
use std::cell::RefCell;
@@ -31,6 +32,7 @@ pub struct Notedeck {
zoom: ZoomHandler,
app_size: AppSizeHandler,
unrecognized_args: BTreeSet<String>,
clipboard: Clipboard,
}
/// Our chrome, which is basically nothing
@@ -214,6 +216,7 @@ impl Notedeck {
zoom,
app_size,
unrecognized_args,
clipboard: Clipboard::new(None),
}
}
@@ -233,6 +236,7 @@ impl Notedeck {
path: &self.path,
args: &self.args,
theme: &mut self.theme,
clipboard: &mut self.clipboard,
}
}

View File

@@ -1,4 +1,5 @@
use crate::{Accounts, Args, DataPath, Images, NoteCache, ThemeHandler, UnknownIds};
use egui_winit::clipboard::Clipboard;
use enostr::RelayPool;
use nostrdb::Ndb;
@@ -15,4 +16,5 @@ pub struct AppContext<'a> {
pub path: &'a DataPath,
pub args: &'a Args,
pub theme: &'a mut ThemeHandler,
pub clipboard: &'a mut Clipboard,
}