diff options
author | Egor Nemtsev <enemtsev@luxoft.com> | 2020-04-06 18:59:19 +0300 |
---|---|---|
committer | Egor Nemtsev <enemtsev@luxoft.com> | 2020-04-07 09:27:51 +0000 |
commit | 0b3dceee64bfd16ee4578a5f714f3a0690be1948 (patch) | |
tree | fea4dd944e4be734e629b1fae7872a2b25e129d1 | |
parent | 785b520d07d82193dee0573fffdbc1314b50f336 (diff) |
[sysui] update "guess-app" to process "home"
- if guess-app parameter for activate-app intent is "home", show home view
this will make "home" a reserved word, so no other app with "home" name could be opened
Fixes: AUTOSUITE-1559
Change-Id: Ic90034df6b7e7772f4f7073230505c5b5bc0ad81
Reviewed-by: Grigorii Zimin <gzimin@luxoft.com>
-rw-r--r-- | sysui/stores/RootStore.qml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sysui/stores/RootStore.qml b/sysui/stores/RootStore.qml index 861e8f33..e8f6c191 100644 --- a/sysui/stores/RootStore.qml +++ b/sysui/stores/RootStore.qml @@ -204,11 +204,17 @@ Store { onDisambiguationRequest: { //process "activate-app" intent sent with part of app name (guess-app) as parameter if (potentialIntents.length > 0 && potentialIntents[0].intentId === "activate-app") { - if (parameters["guess-app"] && parameters["guess-app"] !== "") { + var guess_app = parameters["guess-app"]; + if (guess_app && guess_app !== "") { + if (guess_app === "home") { + // if "home" is called, go to home view + applicationModel.goHome(); + } + var appId = ""; for (var i = 0; i < potentialIntents.length; i++) { - if (potentialIntents[i].applicationId.includes(parameters["guess-app"])) { + if (potentialIntents[i].applicationId.includes(guess_app)) { appId = potentialIntents[i].applicationId; break; } |