mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-13 05:19:50 +04:00
JS: gui: viewDispatcher.currentView
This commit is contained in:
@@ -105,9 +105,13 @@ eventLoop.subscribe(views.bytekb.input, function (_sub, data, gui, views) {
|
||||
}, gui, views);
|
||||
|
||||
// go to the demo chooser screen when the back key is pressed
|
||||
eventLoop.subscribe(gui.viewDispatcher.navigation, function (_sub, _, gui, views) {
|
||||
eventLoop.subscribe(gui.viewDispatcher.navigation, function (_sub, _, gui, views, eventLoop) {
|
||||
if (gui.viewDispatcher.currentView === views.demos) {
|
||||
eventLoop.stop();
|
||||
return;
|
||||
}
|
||||
gui.viewDispatcher.switchTo(views.demos);
|
||||
}, gui, views);
|
||||
}, gui, views, eventLoop);
|
||||
|
||||
// run UI
|
||||
gui.viewDispatcher.switchTo(views.demos);
|
||||
|
||||
Reference in New Issue
Block a user