fix previous dislike logic and change MinSDK

This commit is contained in:
KevinX8 2022-02-16 01:17:55 +00:00
parent dfb25653b2
commit 5e78704276
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ android {
defaultConfig {
applicationId "vanced.integrations"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 31
versionCode 1
versionName "1.0"

View File

@ -210,14 +210,14 @@ public class ReturnYouTubeDislikes {
// If active status was removed, vote should be none
if (previousState) { votingValue = 0; }
if (tag.equals("like")) {
dislikeActive = false;
// Like was activated
if (!previousState) { votingValue = 1; likeActive = true; }
else { likeActive = false; }
// Like was activated and dislike was previously activated
if (!previousState) { dislikeCount--; trySetDislikes(formatDislikes(dislikeCount)); }
if (!previousState && dislikeActive) { dislikeCount--; trySetDislikes(formatDislikes(dislikeCount)); }
dislikeActive = false;
}
else if (tag.equals("dislike")) {
likeActive = false;