0
0
Fork 0
mirror of https://github.com/YTVanced/Integrations synced 2024-10-31 16:32:39 +00:00

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

View file

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