aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2023-04-17 09:57:10 +0200
committerRoger Zanoni <rzanoni@igalia.com>2023-04-20 23:09:30 +0200
commit5d264b8a8ee7813809ef6131be0037457b9cd1e4 (patch)
treeacd23fe70fdf2ca58f93288a9476fd1f4a472cc3
parent1283e3bddd4655be0d5208fbbcd9535f8f1ff0f6 (diff)
Fix application listing and starting
After chromium started communicating with applaunchd using gRPC, the application list is constructed differently and the launcher 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: I1d128da6da3aeeb82e4f9dcb297289db7668af3b
-rw-r--r--src/js/app.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/js/app.js b/src/js/app.js
index 90f0e80..9393cb9 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -32,16 +32,16 @@ function load_application_list() {
page.apps = [];
for( var i=0; i<apps.length; i++) {
- if( configjson.black_list.indexOf(apps[i][0]) === -1 ) {
+ if( configjson.black_list.indexOf(apps[i].id) === -1 ) {
(function(app) {
let app_entry = {};
- app_entry.id = app[0];
- app_entry.name = app[1];
- if( configjson.icons[app_entry.id.split('@')[0]] ) {
- app_entry.icon = configjson.icons[app_entry.id.split('@')[0]];
+ app_entry.id = app.id;
+ app_entry.name = app.name;
+ if( configjson.icons[app_entry.id] ) {
+ app_entry.icon = configjson.icons[app_entry.id];
} else {
app_entry.icon = undefined;
- app_entry.letter = app[1][0];
+ app_entry.letter = app.name[0];
}
page.apps.push(app_entry);
@@ -55,7 +55,7 @@ function load_application_list() {
export function launch(appId) {
console.log(appId);
- navigator.appService.start(appId.split('@')[0]);
+ navigator.appService.start(appId);
}
export function init() {
@@ -67,4 +67,4 @@ export function init() {
console.error('ERRROR loading main template', error);
});
-} \ No newline at end of file
+}