Skip to content

Commit 59f0c73

Browse files
committed
save settings on create/connect to lobby to prevent them from being deleted as easily
1 parent e9bddda commit 59f0c73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

noita-proxy/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,13 +964,15 @@ impl App {
964964
match &self.steam_state {
965965
Ok(_) => {
966966
if ui.button(tr("connect_steam_create")).clicked() {
967+
self.set_settings();
967968
self.start_steam_host();
968969
}
969970
if ui.button(tr("connect_steam_connect")).clicked() {
970971
let id = ClipboardProvider::new()
971972
.and_then(|mut ctx: ClipboardContext| ctx.get_contents());
972973
match id {
973974
Ok(id) => {
975+
self.set_settings();
974976
self.connect_to_steam_lobby(id);
975977
}
976978
Err(error) => self.notify_error(error),
@@ -982,6 +984,7 @@ impl App {
982984
ui.label(tr("connect_steam_workaround_label"));
983985
ui.text_edit_singleline(&mut self.lobby_id_field);
984986
if ui.button(tr("connect_steam_connect_2")).clicked() {
987+
self.set_settings();
985988
self.connect_to_steam_lobby(self.lobby_id_field.clone());
986989
}
987990
}
@@ -997,6 +1000,7 @@ impl App {
9971000

9981001
ui.label(tr("ip_note"));
9991002
if ui.button(tr("ip_host")).clicked() {
1003+
self.set_settings();
10001004
self.start_server();
10011005
}
10021006

@@ -1011,6 +1015,7 @@ impl App {
10111015
ui.add_enabled_ui(addr.is_ok(), |ui| {
10121016
if ui.button(tr("ip_connect")).clicked() {
10131017
if let Ok(addr) = addr {
1018+
self.set_settings();
10141019
self.start_connect(addr);
10151020
}
10161021
}

0 commit comments

Comments
 (0)