Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-04-01 21:58:23 -04:00
parent cbf281dcc1
commit 18ea05db0a
8 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
use crate::persist::{AppSizeHandler, ZoomHandler};
use crate::wallet::GlobalWallet;
use crate::zaps::Zaps;
use crate::{
AccountStorage, Accounts, AppContext, Args, DataPath, DataPathType, Directory, Images,
NoteCache, RelayDebugView, ThemeHandler, UnknownIds,
@@ -35,6 +36,7 @@ pub struct Notedeck {
app_size: AppSizeHandler,
unrecognized_args: BTreeSet<String>,
clipboard: Clipboard,
zaps: Zaps,
}
/// Our chrome, which is basically nothing
@@ -205,6 +207,7 @@ impl Notedeck {
}
let global_wallet = GlobalWallet::new(&path);
let zaps = Zaps::default();
Self {
ndb,
@@ -222,6 +225,7 @@ impl Notedeck {
app_size,
unrecognized_args,
clipboard: Clipboard::new(None),
zaps,
}
}
@@ -243,6 +247,7 @@ impl Notedeck {
args: &self.args,
theme: &mut self.theme,
clipboard: &mut self.clipboard,
zaps: &mut self.zaps,
}
}

View File

@@ -1,5 +1,6 @@
use crate::{
wallet::GlobalWallet, Accounts, Args, DataPath, Images, NoteCache, ThemeHandler, UnknownIds,
wallet::GlobalWallet, zaps::Zaps, Accounts, Args, DataPath, Images, NoteCache, ThemeHandler,
UnknownIds,
};
use egui_winit::clipboard::Clipboard;
@@ -20,4 +21,5 @@ pub struct AppContext<'a> {
pub args: &'a Args,
pub theme: &'a mut ThemeHandler,
pub clipboard: &'a mut Clipboard,
pub zaps: &'a mut Zaps,
}

View File

@@ -61,3 +61,5 @@ pub use wallet::{
// export libs
pub use enostr;
pub use nostrdb;
pub use zaps::Zaps;

View File

@@ -14,6 +14,7 @@ use super::{
type ZapId = u32;
#[allow(dead_code)]
#[derive(Default)]
pub struct Zaps {
next_id: ZapId,
zap_keys: hashbrown::HashMap<ZapKeyOwned, Vec<ZapId>>,

View File

@@ -1,3 +1,5 @@
mod cache;
mod networking;
mod zap;
mod zap;
pub use cache::Zaps;