Skip to content

Commit

Permalink
fixed double send OnDriverDistraction
Browse files Browse the repository at this point in the history
  • Loading branch information
ONyzhnyk-Luxoft committed Dec 19, 2018
1 parent 7962e1e commit 1e0665c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/controller/sdl/Abstract/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,13 @@ SDL.SDLController = Em.Object.extend(
/**
* SDL Driver Distraction ON/OFF switcher
*/
selectDriverDistraction: function() {
if (SDL.SDLModel.data.driverDistractionState) {
selectDriverDistraction: function(event) {
if (event.currentTarget.checked) {
FFW.UI.onDriverDistraction('DD_ON');
} else {
FFW.UI.onDriverDistraction('DD_OFF');
}
}.observes('SDL.SDLModel.data.driverDistractionState'),
},
/**
* Ondisplay keyboard event handler
* Sends notification on SDL Core with changed value
Expand Down
5 changes: 3 additions & 2 deletions app/view/home/controlButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,9 @@ getCurrentDisplayModeClass: function() {

classNames: 'driverDistractionControlCheckBox',

checkedBinding: 'SDL.SDLModel.data.driverDistractionState'

checkedBinding: 'SDL.SDLModel.data.driverDistractionState',

change: SDL.SDLController.selectDriverDistraction,
}
)
}
Expand Down

0 comments on commit 1e0665c

Please sign in to comment.