Skip to content

Commit

Permalink
Add 0 app to update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Jun 23, 2024
1 parent de25911 commit a6d40aa
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions modules/firmware_apps/app_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,18 @@ def compare_version(v1, v2):
self.apps_with_updates.append(ia)
else:
print("No app in app store matching: ", ia)

self.update_menu = Menu(
self,
menu_items=[app["name"] for app in self.apps_with_updates],
select_handler=on_select,
back_handler=on_cancel,
focused_item_font_size=fourteen_pt,
item_font_size=ten_pt,
)
if len(self.apps_with_updates):
self.update_menu = Menu(
self,
menu_items=[app["name"] for app in self.apps_with_updates],
select_handler=on_select,
back_handler=on_cancel,
focused_item_font_size=fourteen_pt,
item_font_size=ten_pt,
)
else:
self.update_state("main_menu")
eventbus.emit(ShowNotificationEvent("All apps up to date!"))

def prepare_installed_menu(self):
def on_cancel():
Expand Down

0 comments on commit a6d40aa

Please sign in to comment.