mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
Load server details when opening from the launcher sidebar
Use the shared open_server path so stopped servers load settings immediately and switching servers clears stale detail state. Co-Authored-By: Codex (GPT-6.1) <[email protected]>
This commit is contained in:
1 parent
512545ade7
commit
bcdbc252fe
2 files changed
+2
-2
No files matched your search
@@ -1793,7 +1793,7 @@ impl Launcher {
|
||||
.child(sub(tr(if up { "Running" } else { "Stopped" }).into())),
|
||||
)
|
||||
.on_click(cx.listener(move |this, _: &ClickEvent, _, cx| {
|
||||
this.servers.open = Some(dir.clone());
|
||||
this.open_server(dir.clone());
|
||||
this.go(Page::Servers);
|
||||
cx.notify();
|
||||
})),
|
||||
|
||||
@@ -477,7 +477,7 @@ impl Launcher {
|
||||
});
|
||||
}
|
||||
|
||||
fn open_server(&mut self, dir: PathBuf) {
|
||||
pub(super) fn open_server(&mut self, dir: PathBuf) {
|
||||
if self.servers.open.as_ref() == Some(&dir) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user