1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-24 20:07:14 +01:00

fix(YouTube - Return YouTube dislike): Fix layout of right to left languages

This commit is contained in:
LisoUseInAIKyrios 2023-11-26 23:25:59 +02:00
parent b514bdd7d0
commit 11abdf162f

View File

@ -335,9 +335,13 @@ public class ReturnYouTubeDislikePatch {
// YouTube Rolling Numbers do not use compound drawables or drawable padding.
if (view.getCompoundDrawablePadding() == 0) {
LogHelper.printDebug(() -> "Adding rolling number TextView changes");
ShapeDrawable leftSeparator = ReturnYouTubeDislike.getLeftSeparatorDrawable();
view.setCompoundDrawables(leftSeparator, null, null, null);
view.setCompoundDrawablePadding(ReturnYouTubeDislike.leftSeparatorShapePaddingPixels);
ShapeDrawable separator = ReturnYouTubeDislike.getLeftSeparatorDrawable();
if (ReVancedUtils.isRightToLeftTextLayout()) {
view.setCompoundDrawables(null, null, separator, null);
} else {
view.setCompoundDrawables(separator, null, null, null);
}
}
}