Revert "simplify vote switch"

This reverts commit a5d182a6
This commit is contained in:
caneleex 2022-01-25 22:47:42 +01:00
parent a5d182a633
commit 7445ce6fa2
1 changed files with 4 additions and 3 deletions

View File

@ -229,11 +229,12 @@ public abstract class SponsorBlockUtils {
new AlertDialog.Builder(context)
.setItems(items, (dialog1, which1) -> {
appContext = new WeakReference<>(context.getApplicationContext());
VoteOption voteOption = voteOptions[which1];
switch (voteOption) {
switch (voteOptions[which1]) {
case UPVOTE:
voteForSegment(segment, VoteOption.UPVOTE, appContext.get(), toastRunnable);
break;
case DOWNVOTE:
voteForSegment(segment, voteOption, appContext.get(), toastRunnable);
voteForSegment(segment, VoteOption.DOWNVOTE, appContext.get(), toastRunnable);
break;
case CATEGORY_CHANGE:
onNewCategorySelect(segment, context);