Skip to content

Commit 8b22a9a

Browse files
committed
Swap if for switch
1 parent 81b2113 commit 8b22a9a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Diff for: app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -623,12 +623,16 @@ public void onPlayFromMediaId (String mediaId, Bundle extras) {
623623

624624
@Override
625625
public void onCustomAction(String action, Bundle extras) {
626-
if(CUSTOM_ACTION_THUMBS_UP.equals(action)) {
627-
downloadService.toggleRating(5);
628-
} else if(CUSTOM_ACTION_THUMBS_DOWN.equals(action)) {
629-
downloadService.toggleRating(1);
630-
} else if(CUSTOM_ACTION_STAR.equals(action)) {
631-
downloadService.toggleStarred();
626+
switch (action) {
627+
case CUSTOM_ACTION_THUMBS_UP:
628+
downloadService.toggleRating(5);
629+
break;
630+
case CUSTOM_ACTION_THUMBS_DOWN:
631+
downloadService.toggleRating(1);
632+
break;
633+
case CUSTOM_ACTION_STAR:
634+
downloadService.toggleStarred();
635+
break;
632636
}
633637
}
634638

0 commit comments

Comments
 (0)