File tree Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,6 @@ pub struct Station {
6363 #[ serde( default = "default_station_start_scanning" ) ]
6464 pub start_scanning : char ,
6565
66- #[ serde( default = "default_station_toggle_connect" ) ]
67- pub toggle_connect : char ,
68-
6966 #[ serde( default ) ]
7067 pub known_network : KnownNetwork ,
7168}
@@ -74,7 +71,6 @@ impl Default for Station {
7471 fn default ( ) -> Self {
7572 Self {
7673 start_scanning : 's' ,
77- toggle_connect : ' ' ,
7874 known_network : KnownNetwork :: default ( ) ,
7975 }
8076 }
@@ -84,10 +80,6 @@ fn default_station_start_scanning() -> char {
8480 's'
8581}
8682
87- fn default_station_toggle_connect ( ) -> char {
88- ' '
89- }
90-
9183#[ derive( Deserialize , Debug ) ]
9284pub struct KnownNetwork {
9385 #[ serde( default = "default_station_remove_known_network" ) ]
Original file line number Diff line number Diff line change @@ -487,8 +487,7 @@ pub async fn handle_key_events(
487487 }
488488
489489 // Connect/Disconnect
490- KeyCode :: Enter => toggle_connect ( app, sender) . await ?,
491- KeyCode :: Char ( c) if c == config. station . toggle_connect => {
490+ KeyCode :: Enter | KeyCode :: Char ( ' ' ) => {
492491 toggle_connect ( app, sender) . await ?
493492 }
494493
@@ -533,8 +532,7 @@ pub async fn handle_key_events(
533532 }
534533 }
535534 FocusedBlock :: NewNetworks => match key_event. code {
536- KeyCode :: Enter => toggle_connect ( app, sender) . await ?,
537- KeyCode :: Char ( c) if c == config. station . toggle_connect => {
535+ KeyCode :: Enter | KeyCode :: Char ( ' ' ) => {
538536 toggle_connect ( app, sender) . await ?
539537 }
540538 KeyCode :: Char ( 'j' ) | KeyCode :: Down => {
Original file line number Diff line number Diff line change @@ -712,12 +712,7 @@ impl Station {
712712 if frame. area ( ) . width <= 130 {
713713 vec ! [
714714 Line :: from( vec![
715- Span :: from( if config. station. toggle_connect == ' ' {
716- " or ↵ " . to_string( )
717- } else {
718- config. station. toggle_connect. to_string( )
719- } )
720- . bold( ) ,
715+ Span :: from( " or ↵ " ) . bold( ) ,
721716 Span :: from( " Dis/connect" ) ,
722717 Span :: from( " | " ) ,
723718 Span :: from( config. station. known_network. show_all. to_string( ) ) . bold( ) ,
@@ -758,12 +753,7 @@ impl Station {
758753 Span :: from( "j," ) . bold( ) ,
759754 Span :: from( " Down" ) ,
760755 Span :: from( " | " ) ,
761- Span :: from( if config. station. toggle_connect == ' ' {
762- " or ↵ " . to_string( )
763- } else {
764- config. station. toggle_connect. to_string( )
765- } )
766- . bold( ) ,
756+ Span :: from( " or ↵ " ) . bold( ) ,
767757 Span :: from( " Dis/connect" ) ,
768758 Span :: from( " | " ) ,
769759 Span :: from( config. station. known_network. show_all. to_string( ) ) . bold( ) ,
You can’t perform that action at this time.
0 commit comments