From e85c42ae77592afdb72df8e8d4f27e0e7ad17bb9 Mon Sep 17 00:00:00 2001 From: Roger Zanoni Date: Sat, 15 Apr 2023 17:24:35 +0200 Subject: Fix application listing and starting After chromium started communicating with applaunchd using gRPC, the application list is constructed differently and the homescreen application need to change to adapt to the new data model. Bug-AGL: SPEC-4764 Signed-off-by: Roger Zanoni Change-Id: I0da2ffe40981db267aac828a51a6bbf203151cf6 --- src/js/apps.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/apps.js b/src/js/apps.js index d7b1201..bddb848 100644 --- a/src/js/apps.js +++ b/src/js/apps.js @@ -14,7 +14,7 @@ function show() { function locateApp(appId, appList) { return appList.find(function(app){ - return app[0].split('@')[0] === appId + return app.id === appId }); } @@ -23,16 +23,16 @@ function load_application_list() { configjson.apps.forEach(function(app) { var internalApp = locateApp(app.id, result); - if( internalApp ) { + if (internalApp) { page.apps.push({ - id: internalApp[0], - name: internalApp[1], + id: internalApp.id, + name: internalApp.name, icon: app.icon }); if( app.id === configjson.launch ) { setTimeout(function() { - navigator.appService.start(internalApp[0]); + navigator.appService.start(internalApp.id); }, 1000); } } @@ -44,7 +44,7 @@ function load_application_list() { } export function start(appId) { - navigator.appService.start(appId.split('@')[0]); + navigator.appService.start(appId); } export function init(node) { @@ -56,4 +56,4 @@ export function init(node) { }, function(error) { console.error('ERRROR loading main template', error); }); -} \ No newline at end of file +} -- cgit 1.2.3-korg