Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub struct LauncherApp {

impl LauncherApp {
pub fn new(
ctx: &egui::Context,
actions: Vec<Action>,
plugins: PluginManager,
actions_path: String,
Expand Down Expand Up @@ -100,7 +101,9 @@ impl LauncherApp {
}
}

Self {
let initial_visible = visible_flag.load(Ordering::SeqCst);

let app = Self {
actions: actions.clone(),
query: String::new(),
results: actions,
Expand All @@ -116,8 +119,13 @@ impl LauncherApp {
plugin_dirs,
index_paths,
visible_flag: visible_flag.clone(),
last_visible: visible_flag.load(Ordering::SeqCst),
}
last_visible: initial_visible,
};

tracing::debug!("initial viewport visible: {}", initial_visible);
ctx.send_viewport_cmd(egui::ViewportCommand::Visible(initial_visible));

app
}

pub fn search(&mut self) {
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ fn spawn_gui(
Box::new(move |cc| {
*ctx_clone.lock().unwrap() = Some(cc.egui_ctx.clone());
Box::new(LauncherApp::new(
&cc.egui_ctx,
actions_for_window,
plugins,
actions_path,
Expand Down