diff options
author | Roger Zanoni <rzanoni@igalia.com> | 2023-04-15 17:24:35 +0200 |
---|---|---|
committer | Roger Zanoni <rzanoni@igalia.com> | 2023-04-20 23:07:06 +0200 |
commit | e85c42ae77592afdb72df8e8d4f27e0e7ad17bb9 (patch) | |
tree | bd5d3e0eaded5ecc11d6d24d9c00f17511a5e7f4 | |
parent | f3cecb6e79d7fcac14535108c06cb5a922159d78 (diff) |
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 <rzanoni@igalia.com>
Change-Id: I0da2ffe40981db267aac828a51a6bbf203151cf6
-rw-r--r-- | src/js/apps.js | 14 |
1 files 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 +} |