Files
notedeck/crates/notedeck_columns/src/view_state.rs
kernelkind 4ea17f8920 holder for ProfileState
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-03 18:39:35 -05:00

24 lines
611 B
Rust

use std::collections::HashMap;
use enostr::Pubkey;
use crate::deck_state::DeckState;
use crate::login_manager::AcquireKeyState;
use crate::profile_state::ProfileState;
/// Various state for views
#[derive(Default)]
pub struct ViewState {
pub login: AcquireKeyState,
pub id_to_deck_state: HashMap<egui::Id, DeckState>,
pub id_state_map: HashMap<egui::Id, AcquireKeyState>,
pub id_string_map: HashMap<egui::Id, String>,
pub pubkey_to_profile_state: HashMap<Pubkey, ProfileState>,
}
impl ViewState {
pub fn login_mut(&mut self) -> &mut AcquireKeyState {
&mut self.login
}
}