Skip to content

Commit fe50c9a

Browse files
committed
refresh the session when connecting to a new network
1 parent ada4f8c commit fe50c9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/handler.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,17 @@ pub async fn handle_key_events(
344344
.unwrap()
345345
.new_networks[net_index]
346346
.clone();
347+
348+
let mode = app.current_mode.clone();
347349
tokio::spawn(async move {
348350
net.connect(sender.clone())
349351
.await
350352
.unwrap();
353+
354+
sender
355+
.clone()
356+
.send(Event::Reset(mode))
357+
.unwrap();
351358
});
352359
}
353360
}

0 commit comments

Comments
 (0)