Skip to content

Commit

Permalink
Merge pull request #34 from AKalinich-Luxoft/fix/fix_hd_channel_conen…
Browse files Browse the repository at this point in the history
…t_values

Fix current HD channel values dependency
  • Loading branch information
AKalinich-Luxoft authored Aug 2, 2017
2 parents 4989cbf + 0524a76 commit 4fbd0bc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions app/view/media/player/radioView.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,20 @@ SDL.RadioView = Em.ContainerView
{
elementId: 'hdChannelInput',
classNames: 'hdChannelInput',
contentBinding: 'SDL.RadioModel.hdChannelsStruct',
valueBinding: 'SDL.RadioModel.radioControlStruct.hdChannel'
availableHDValueChanged: function() {
var result = SDL.RadioModel.hdChannelsStruct.slice();
var index = result.indexOf(
SDL.RadioModel.radioControlStruct.availableHDs);
result.splice(index + 1, index + result.length - 1);
var maxHdValue = result[result.length - 1];
if (SDL.RadioModel.radioControlStruct.hdChannel > maxHdValue) {
SDL.RadioModel.setCurrentHdChannel(maxHdValue);
}
this.set('content', result);
}.observes(
'SDL.RadioModel.radioControlStruct.availableHDs'
),
valueBinding: 'SDL.RadioModel.radioControlStruct.hdChannel',
}
),
signalStrengthLabel: SDL.Label.extend(
Expand Down

0 comments on commit 4fbd0bc

Please sign in to comment.