Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
45b3a1a1
Commit
45b3a1a1
authored
Aug 20, 2019
by
koalo
Browse files
fix: Do not crash in case of no apps
parent
f33167e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
preload/menu.py
View file @
45b3a1a1
...
...
@@ -71,6 +71,13 @@ def main():
numapps
=
len
(
applist
)
current
=
0
for
ev
in
button_events
():
if
numapps
==
0
:
disp
.
clear
()
disp
.
print
(
"No apps"
,
posy
=
0
)
disp
.
print
(
"available"
,
posy
=
20
)
disp
.
update
()
continue
if
ev
==
buttons
.
BOTTOM_RIGHT
:
# Scroll down
draw_menu
(
disp
,
applist
,
current
,
-
8
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment