refactor app code (#93)

This commit is contained in:
Ken Van Hoeylandt
2024-11-26 22:17:01 +01:00
committed by GitHub
parent a312bd5527
commit d7b151ab88
40 changed files with 367 additions and 439 deletions
+3 -3
View File
@@ -23,12 +23,12 @@ static void create_app_widget(const Manifest* manifest, void* parent) {
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
}
static void desktop_show(TT_UNUSED App app, lv_obj_t* parent) {
static void desktop_show(TT_UNUSED App& app, lv_obj_t* parent) {
lv_obj_t* list = lv_list_create(parent);
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
lv_obj_center(list);
auto manifests = app_manifest_registry_get();
auto manifests = getApps();
std::sort(manifests.begin(), manifests.end(), SortAppManifestByName);
lv_list_add_text(list, "User");
@@ -50,7 +50,7 @@ extern const Manifest manifest = {
.id = "Desktop",
.name = "Desktop",
.type = TypeDesktop,
.on_show = &desktop_show,
.onShow = &desktop_show,
};
} // namespace