@@ -145,38 +145,38 @@ impl App {
145145 }
146146 AppEvent :: NavigateUp => {
147147 // Only handle navigation in settings modal
148- if matches ! ( self . state, AppState :: Settings ) {
149- if let Some ( ref mut modal_state) = self . modal_state {
150- modal_state . navigate_up ( ) ;
151- // Apply live theme preview
152- let selected_theme = modal_state . selected_theme ( ) ;
153- self . theme . set_variant ( selected_theme) ;
154- }
148+ if matches ! ( self . state, AppState :: Settings )
149+ && let Some ( ref mut modal_state) = self . modal_state
150+ {
151+ modal_state . navigate_up ( ) ;
152+ // Apply live theme preview
153+ let selected_theme = modal_state . selected_theme ( ) ;
154+ self . theme . set_variant ( selected_theme ) ;
155155 }
156156 }
157157 AppEvent :: NavigateDown => {
158158 // Only handle navigation in settings modal
159- if matches ! ( self . state, AppState :: Settings ) {
160- if let Some ( ref mut modal_state) = self . modal_state {
161- modal_state . navigate_down ( ) ;
162- // Apply live theme preview
163- let selected_theme = modal_state . selected_theme ( ) ;
164- self . theme . set_variant ( selected_theme) ;
165- }
159+ if matches ! ( self . state, AppState :: Settings )
160+ && let Some ( ref mut modal_state) = self . modal_state
161+ {
162+ modal_state . navigate_down ( ) ;
163+ // Apply live theme preview
164+ let selected_theme = modal_state . selected_theme ( ) ;
165+ self . theme . set_variant ( selected_theme ) ;
166166 }
167167 }
168168 AppEvent :: Select => {
169169 // Only handle selection in settings modal
170- if matches ! ( self . state, AppState :: Settings ) {
171- if let Some ( ref modal_state) = self . modal_state {
172- let selected_theme = modal_state. selected_theme ( ) ;
173- let action = SettingsAction :: ChangeTheme ( selected_theme) ;
174- if let Err ( e) = self . handle_settings_action ( action) {
175- self . state = AppState :: Error ( format ! ( "Settings error: {}" , e) ) ;
176- }
177- // Close modal after selection
178- self . exit_settings ( ) ;
170+ if matches ! ( self . state, AppState :: Settings )
171+ && let Some ( ref modal_state) = self . modal_state
172+ {
173+ let selected_theme = modal_state. selected_theme ( ) ;
174+ let action = SettingsAction :: ChangeTheme ( selected_theme) ;
175+ if let Err ( e) = self . handle_settings_action ( action) {
176+ self . state = AppState :: Error ( format ! ( "Settings error: {}" , e) ) ;
179177 }
178+ // Close modal after selection
179+ self . exit_settings ( ) ;
180180 }
181181 }
182182 AppEvent :: SettingsAction ( action) => {
@@ -226,10 +226,10 @@ impl App {
226226 self . render_footer ( frame, layout_rects. footer ) ;
227227
228228 // Render modal overlay if in settings state
229- if matches ! ( self . state, AppState :: Settings ) {
230- if let Some ( ref modal_state) = self . modal_state {
231- crate :: settings :: render_settings_modal ( frame , size , modal_state , & self . theme ) ;
232- }
229+ if matches ! ( self . state, AppState :: Settings )
230+ && let Some ( ref modal_state) = self . modal_state
231+ {
232+ crate :: settings :: render_settings_modal ( frame , size , modal_state , & self . theme ) ;
233233 }
234234 }
235235
0 commit comments