app window size persists on app close

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-10-18 18:21:56 -04:00
parent d3b4a9efc1
commit 03bfb34172
6 changed files with 144 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
use crate::{
account_manager::AccountManager,
app_creation::setup_cc,
app_size_handler::AppSizeHandler,
app_style::user_requested_visuals_change,
args::Args,
column::Columns,
@@ -60,6 +61,7 @@ pub struct Damus {
pub img_cache: ImageCache,
pub accounts: AccountManager,
pub subscriptions: Subscriptions,
pub app_rect_handler: AppSizeHandler,
frame_history: crate::frame_history::FrameHistory,
@@ -507,6 +509,8 @@ fn update_damus(damus: &mut Damus, ctx: &egui::Context) {
error!("error processing event: {}", err);
}
damus.app_rect_handler.try_save_app_size(ctx);
damus.columns.attempt_perform_deletion_request();
}
@@ -746,6 +750,7 @@ impl Damus {
accounts,
frame_history: FrameHistory::default(),
view_state: ViewState::default(),
app_rect_handler: AppSizeHandler::default(),
}
}
@@ -829,6 +834,7 @@ impl Damus {
accounts: AccountManager::new(KeyStorageType::None),
frame_history: FrameHistory::default(),
view_state: ViewState::default(),
app_rect_handler: AppSizeHandler::default(),
}
}