@@ -340,9 +340,15 @@ impl App {
340340 crate :: ui:: keymap:: AppAction :: Up => {
341341 if self . state . screen == Screen :: Home
342342 && self . state . section == Section :: Transactions
343- && self . state . transactions . mode == TransactionsMode :: List
343+ && matches ! (
344+ self . state. transactions. mode,
345+ TransactionsMode :: List | TransactionsMode :: Detail
346+ )
344347 {
345348 self . state . transactions . select_prev ( ) ;
349+ if self . state . transactions . mode == TransactionsMode :: Detail {
350+ self . open_transaction_detail ( ) . await ?;
351+ }
346352 } else if self . state . screen == Screen :: Home
347353 && self . state . section == Section :: Transactions
348354 && matches ! (
@@ -366,22 +372,34 @@ impl App {
366372 self . transaction_form_select_prev ( ) ;
367373 } else if self . state . screen == Screen :: Home
368374 && self . state . section == Section :: Wallets
369- && self . state . wallets . mode == WalletsMode :: List
375+ && matches ! ( self . state. wallets. mode, WalletsMode :: List | WalletsMode :: Detail )
370376 {
371377 self . wallets_select_prev ( ) ;
378+ if self . state . wallets . mode == WalletsMode :: Detail {
379+ self . open_wallet_detail ( ) . await ?;
380+ }
372381 } else if self . state . screen == Screen :: Home
373382 && self . state . section == Section :: Flows
374- && self . state . flows . mode == FlowsMode :: List
383+ && matches ! ( self . state. flows. mode, FlowsMode :: List | FlowsMode :: Detail )
375384 {
376385 self . flows_select_prev ( ) ;
386+ if self . state . flows . mode == FlowsMode :: Detail {
387+ self . open_flow_detail ( ) . await ?;
388+ }
377389 }
378390 }
379391 crate :: ui:: keymap:: AppAction :: Down => {
380392 if self . state . screen == Screen :: Home
381393 && self . state . section == Section :: Transactions
382- && self . state . transactions . mode == TransactionsMode :: List
394+ && matches ! (
395+ self . state. transactions. mode,
396+ TransactionsMode :: List | TransactionsMode :: Detail
397+ )
383398 {
384399 self . state . transactions . select_next ( ) ;
400+ if self . state . transactions . mode == TransactionsMode :: Detail {
401+ self . open_transaction_detail ( ) . await ?;
402+ }
385403 } else if self . state . screen == Screen :: Home
386404 && self . state . section == Section :: Transactions
387405 && matches ! (
@@ -405,14 +423,20 @@ impl App {
405423 self . transaction_form_select_next ( ) ;
406424 } else if self . state . screen == Screen :: Home
407425 && self . state . section == Section :: Wallets
408- && self . state . wallets . mode == WalletsMode :: List
426+ && matches ! ( self . state. wallets. mode, WalletsMode :: List | WalletsMode :: Detail )
409427 {
410428 self . wallets_select_next ( ) ;
429+ if self . state . wallets . mode == WalletsMode :: Detail {
430+ self . open_wallet_detail ( ) . await ?;
431+ }
411432 } else if self . state . screen == Screen :: Home
412433 && self . state . section == Section :: Flows
413- && self . state . flows . mode == FlowsMode :: List
434+ && matches ! ( self . state. flows. mode, FlowsMode :: List | FlowsMode :: Detail )
414435 {
415436 self . flows_select_next ( ) ;
437+ if self . state . flows . mode == FlowsMode :: Detail {
438+ self . open_flow_detail ( ) . await ?;
439+ }
416440 }
417441 }
418442 crate :: ui:: keymap:: AppAction :: Input ( ch) => {
0 commit comments