diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2019-07-15 12:13:51 +0200 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2019-07-16 12:44:51 +0200 |
commit | 146044a5d19ef0b6f0c5cbcfce7470bf5292167b (patch) | |
tree | 794eed394f198b5e3c9699c9ed10232adfef0670 /src/js | |
parent | 2c4bce6ac4149a9be348d83aa2f69d5580d50e73 (diff) |
FUNCT Call homescreen/showWindow after app is launched
FIXME: this should work, according to the documentation, but it does
not.
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/app.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/js/app.js b/src/js/app.js index 3df6674..48c2b57 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -87,6 +87,27 @@ function load_application_list() { }); } +export function display(app) { + var appId = app.getAttribute('app-id'); + var ws = new afb.ws(function() { + var api_verb = "homescreen/showWindow"; + var request = {application_id: appId, area: "normal.full"}; + ws.call(api_verb, request).then( + function(obj) { + log("success: " + obj.response); + }, + function(obj) { + //TODO Manage errors + log("failure on display"); + } + ); + }, + function() { + //TODO Manage errors + log("ws aborted"); + }); +} + export function launch(app) { var appId = app.getAttribute('app-id'); var ws = new afb.ws(function() { @@ -95,10 +116,11 @@ export function launch(app) { ws.call(api_verb, request).then( function(obj) { log("success: " + obj.response); + display(app); }, function(obj) { //TODO Manage errors - log("failure"); + log("failure on launch"); } ); }, |