Skip to content
Snippets Groups Projects

menu ordered by metadata not folder name

Closed fleur requested to merge fleur/firmware:b-butwasntthisaboutchaos into master
3 unresolved threads
+ 1
1
@@ -23,7+23,7 @@
if f == "main.py":
yield App("Home", f)
for app in sorted(os.listdir("/apps")):
Please register or sign in to reply
if app.startswith("."):
continue
@@ -88,7+88,7 @@
if __name__ == "__main__":
try:
apps = list(enumerate_apps())
apps = sorted(list(enumerate_apps()), key=lambda b: b.name.lower())
    • You need to move the list() to the outside of this again, so it is

      list(sorted(enumerate_apps(), ...))

      Otherwise the code in L95 will not work correctly.

Please register or sign in to reply
except OSError:
apps = []
Loading