Skip to content

Commit

Permalink
Merge branch 'master' into persist_decks
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelkind committed Nov 18, 2024
2 parents 4b62f08 + de8029d commit 7d05860
Show file tree
Hide file tree
Showing 29 changed files with 1,110 additions and 532 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ eframe = { git = "https://github.com/emilk/egui", rev = "fcb7764e48ce00f8f8e58da
egui_extras = { git = "https://github.com/emilk/egui", rev = "fcb7764e48ce00f8f8e58da10f937410d65b0bfb", package = "egui_extras", features = ["all_loaders"] }
ehttp = "0.2.0"
egui_tabs = { git = "https://github.com/damus-io/egui-tabs", branch = "egui-0.28" }
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "6ba42de2bae384d10e35c532f3856b81d2e9f645" }
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "956338a90e09c7cda951d554626483e0cdbc7825" }
egui_virtual_list = { git = "https://github.com/jb55/hello_egui", branch = "egui-0.28", package = "egui_virtual_list" }
reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] }
image = { version = "0.25", features = ["jpeg", "png", "webp"] }
Expand Down
14 changes: 14 additions & 0 deletions enostr/src/relay/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ pub struct PoolEvent<'a> {
pub event: ewebsock::WsEvent,
}

impl<'a> PoolEvent<'a> {
pub fn into_owned(self) -> PoolEventBuf {
PoolEventBuf {
relay: self.relay.to_owned(),
event: self.event,
}
}
}

pub struct PoolEventBuf {
pub relay: String,
pub event: ewebsock::WsEvent,
}

pub struct PoolRelay {
pub relay: Relay,
pub last_ping: Instant,
Expand Down
7 changes: 4 additions & 3 deletions src/account_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ use std::cmp::Ordering;

use enostr::{FilledKeypair, FullKeypair, Keypair};
use nostrdb::Ndb;
use serde::{Deserialize, Serialize};

use crate::{
app::get_active_columns_mut,
decks::{AccountId, DecksCache},
imgcache::ImageCache,
login_manager::LoginState,
login_manager::AcquireKeyState,
route::Route,
storage::{KeyStorageResponse, KeyStorageType},
ui::{
Expand All @@ -33,7 +34,7 @@ pub enum AccountsRouteResponse {
AddAccount(AccountLoginResponse),
}

#[derive(Debug, Eq, PartialEq, Clone, Copy)]
#[derive(Debug, Eq, PartialEq, Clone, Copy, Serialize, Deserialize)]
pub enum AccountsRoute {
Accounts,
AddAccount,
Expand All @@ -54,7 +55,7 @@ pub fn render_accounts_route(
img_cache: &mut ImageCache,
accounts: &mut AccountManager,
decks: &mut DecksCache,
login_state: &mut LoginState,
login_state: &mut AcquireKeyState,
route: AccountsRoute,
) -> Option<AccountSelectionResponse> {
let resp = match route {
Expand Down
Loading

0 comments on commit 7d05860

Please sign in to comment.