Refactor fullscreen toggle action for improved readability. Simplified the listener closure in the Tty7App implementation to enhance code clarity while maintaining functionality.

This commit is contained in:
l0ng-ai
2026-07-07 12:05:42 +08:00
parent c2472c3ab3
commit 5eb455f9d8
+3 -3
View File
@@ -1716,9 +1716,9 @@ impl Render for Tty7App {
.on_action(cx.listener(|this, _: &ToggleMaximizePane, window, cx| {
this.toggle_maximize(window, cx)
}))
.on_action(cx.listener(|_, _: &ToggleFullscreen, window, _cx| {
window.toggle_fullscreen()
}))
.on_action(
cx.listener(|_, _: &ToggleFullscreen, window, _cx| window.toggle_fullscreen()),
)
.on_action(
cx.listener(|this, _: &OpenSettings, window, cx| this.toggle_settings(window, cx)),
)