Skip to content

Commit 4dfe8a9

Browse files
authored
Merge pull request #500 from smartdevicelink/bugfix/menu-replace-running-synchronously
Fix MenuReplaceOperations being added and run synchronously
2 parents fb08253 + 9cff773 commit 4dfe8a9

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

examples/node/hello-sdl/AppClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ class AppClient {
105105
this._isButtonSubscriptionRequested = false;
106106
}
107107

108-
_onConnected () {
108+
async _onConnected () {
109109
this._managersReady = true;
110110
this._checkReadyState();
111111
const screenManager = this._sdlManager.getScreenManager();
112-
112+
113113
// add menus
114114
const menuListener = new SDL.manager.screen.menu.MenuSelectionListener()
115115
.setOnTriggered(triggerSource => {

lib/js/src/manager/screen/_TextAndGraphicUpdateOperation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class _TextAndGraphicUpdateOperation extends _Task {
6666
* The method that causes the task to run.
6767
* @param {_Task} task - The task instance
6868
*/
69-
onExecute (task) {
70-
this._start();
69+
async onExecute (task) {
70+
await this._start();
7171
}
7272
/**
7373
* If the task is not canceled, starts to assemble the show

lib/js/src/manager/screen/menu/_MenuConfigurationUpdateOperation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class _MenuConfigurationUpdateOperation extends _Task {
5353
* The method that causes the task to run.
5454
* @param {_Task} task - The task instance
5555
*/
56-
onExecute (task) {
57-
this._start();
56+
async onExecute (task) {
57+
await this._start();
5858
}
5959

6060
/**

lib/js/src/manager/screen/menu/_MenuManagerBase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class _MenuManagerBase extends _SubManagerBase {
303303
_updateMenuReplaceOperationsWithNewCurrentMenu () {
304304
this._taskQueue.forEach(task => {
305305
if (task.getName() === 'MenuReplaceOperation') {
306-
task.setCurrentMenu(this._currentMenuCells);
306+
task._setCurrentMenu(this._currentMenuCells);
307307
}
308308
});
309309
}
@@ -325,7 +325,7 @@ class _MenuManagerBase extends _SubManagerBase {
325325
_updateMenuReplaceOperationsWithNewMenuConfiguration () {
326326
this._taskQueue.forEach(task => {
327327
if (task.getName() === 'MenuReplaceOperation') {
328-
task.setMenuConfiguration(this._currentMenuConfiguration);
328+
task._setMenuConfiguration(this._currentMenuConfiguration);
329329
}
330330
});
331331
}

lib/js/src/manager/screen/menu/_MenuReplaceOperation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class _MenuReplaceOperation extends _Task {
6767
* The method that causes the task to run.
6868
* @param {_Task} task - The task instance
6969
*/
70-
onExecute (task) {
71-
this._start();
70+
async onExecute (task) {
71+
await this._start();
7272
}
7373

7474
/**

lib/js/src/manager/screen/menu/_MenuShowOperation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class _MenuShowOperation extends _Task {
4949
* The method that causes the task to run.
5050
* @param {_Task} task - The task instance
5151
*/
52-
onExecute (task) {
53-
this._start();
52+
async onExecute (task) {
53+
await this._start();
5454
}
5555

5656
/**

0 commit comments

Comments
 (0)