Skip to content

Commit 4245b72

Browse files
committed
bug fix: When you click on action in secondary row its ignored for first time.
1 parent a345dd2 commit 4245b72

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/main/java/com/corochann/androidtvapptutorial/ui/PlaybackOverlayFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,6 @@ public void onActionClicked(Action action) {
236236
* - HighQualityAction
237237
* - ClosedCaptioningAction
238238
*/
239-
notifyChanged(action);
240-
241239
/* Change icon */
242240
if (action instanceof PlaybackControlsRow.ThumbsUpAction ||
243241
action instanceof PlaybackControlsRow.ThumbsDownAction ||
@@ -247,6 +245,8 @@ public void onActionClicked(Action action) {
247245
action instanceof PlaybackControlsRow.ClosedCaptioningAction) {
248246
((PlaybackControlsRow.MultiAction) action).nextIndex();
249247
}
248+
/* Note: notifyChanged must be called after action.nextIndex has been called */
249+
notifyChanged(action);
250250
}
251251
}
252252
});

0 commit comments

Comments
 (0)