You've already forked revanced-integrations
mirror of
https://github.com/revanced/revanced-integrations
synced 2025-11-19 03:23:27 +01:00
Compare commits
24 Commits
v0.92.2-de
...
v0.93.2-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d65a107c53 | ||
|
|
559bbf9778 | ||
|
|
737246636b | ||
|
|
c2d121f32b | ||
|
|
0af87e2908 | ||
|
|
6960b0bda5 | ||
|
|
5b9a0d3d23 | ||
|
|
9480f20d44 | ||
|
|
557c311825 | ||
|
|
62eb76415c | ||
|
|
5d2cc2ca5d | ||
|
|
09afccce27 | ||
|
|
f393d3790a | ||
|
|
d33c69f8c2 | ||
|
|
b56f472813 | ||
|
|
803130a693 | ||
|
|
8032a3f46a | ||
|
|
d72937c2fd | ||
|
|
fd818a35f5 | ||
|
|
a80fab7070 | ||
|
|
c3eff913dd | ||
|
|
2a16da15d9 | ||
|
|
d076fe0dce | ||
|
|
e833d16bb8 |
1
.github/workflows/pull_request.yml
vendored
1
.github/workflows/pull_request.yml
vendored
@@ -11,6 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
pull-request:
|
||||
name: Open pull request
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -12,13 +12,19 @@ on:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel previou runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Make sure the release step uses its own credentials:
|
||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
@@ -30,8 +36,8 @@ jobs:
|
||||
node-version: "latest"
|
||||
cache: 'npm'
|
||||
- name: Setup semantic-release
|
||||
run: npm install semantic-release @saithodev/semantic-release-backmerge @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
|
||||
run: npm install semantic-release@19.0.5 @saithodev/semantic-release-backmerge @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin@1.7.4 -D
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
run: npx semantic-release
|
||||
|
||||
41
CHANGELOG.md
41
CHANGELOG.md
@@ -1,3 +1,44 @@
|
||||
## [0.93.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.93.1...v0.93.2-dev.1) (2023-01-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube:** save new instead of default value ([#298](https://github.com/revanced/revanced-integrations/issues/298)) ([559bbf9](https://github.com/revanced/revanced-integrations/commit/559bbf9778f20ac0f5ce3af677230a1ec28a55ff))
|
||||
|
||||
## [0.93.1](https://github.com/revanced/revanced-integrations/compare/v0.93.0...v0.93.1) (2023-01-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/microg-support:** open download link if Vanced MicroG is missing ([#290](https://github.com/revanced/revanced-integrations/issues/290)) ([0af87e2](https://github.com/revanced/revanced-integrations/commit/0af87e29085fb5b55cd80ccb61f6e58f72fc5271))
|
||||
|
||||
# [0.93.0](https://github.com/revanced/revanced-integrations/compare/v0.92.2...v0.93.0) (2023-01-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `remove-screenshot-restriction` patch ([#285](https://github.com/revanced/revanced-integrations/issues/285)) ([c3eff91](https://github.com/revanced/revanced-integrations/commit/c3eff913ddb076dc86efd0398e34d04336a655ec))
|
||||
* **youtube/return-youtube-dislike:** better matching color for separators ([#281](https://github.com/revanced/revanced-integrations/issues/281)) ([2a16da1](https://github.com/revanced/revanced-integrations/commit/2a16da15d9a8d37ca65973671f0b4edff0078b47))
|
||||
* **youtube/return-youtube-dislike:** style for minimum width ([#284](https://github.com/revanced/revanced-integrations/issues/284)) ([a80fab7](https://github.com/revanced/revanced-integrations/commit/a80fab7070be203aa8aaf4c8422ea8e998843e67))
|
||||
* **youtube:** `spoof-app-version` patch ([#282](https://github.com/revanced/revanced-integrations/issues/282)) ([fd818a3](https://github.com/revanced/revanced-integrations/commit/fd818a35f5252fc0a37e12b528e020cdfac0ab53))
|
||||
|
||||
# [0.93.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.92.2...v0.93.0-dev.1) (2023-01-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `remove-screenshot-restriction` patch ([#285](https://github.com/revanced/revanced-integrations/issues/285)) ([c3eff91](https://github.com/revanced/revanced-integrations/commit/c3eff913ddb076dc86efd0398e34d04336a655ec))
|
||||
* **youtube/return-youtube-dislike:** better matching color for separators ([#281](https://github.com/revanced/revanced-integrations/issues/281)) ([2a16da1](https://github.com/revanced/revanced-integrations/commit/2a16da15d9a8d37ca65973671f0b4edff0078b47))
|
||||
* **youtube/return-youtube-dislike:** style for minimum width ([#284](https://github.com/revanced/revanced-integrations/issues/284)) ([a80fab7](https://github.com/revanced/revanced-integrations/commit/a80fab7070be203aa8aaf4c8422ea8e998843e67))
|
||||
* **youtube:** `spoof-app-version` patch ([#282](https://github.com/revanced/revanced-integrations/issues/282)) ([fd818a3](https://github.com/revanced/revanced-integrations/commit/fd818a35f5252fc0a37e12b528e020cdfac0ab53))
|
||||
|
||||
## [0.92.2](https://github.com/revanced/revanced-integrations/compare/v0.92.1...v0.92.2) (2023-01-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* load numeric preferences as type String ([212d3a7](https://github.com/revanced/revanced-integrations/commit/212d3a72d879189c061fb77805cda81ca0519495))
|
||||
|
||||
## [0.92.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.92.1...v0.92.2-dev.1) (2023-01-07)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package app.revanced.all.screenshot.removerestriction;
|
||||
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
public class RemoveScreenshotRestrictionPatch {
|
||||
|
||||
public static void setFlags(Window window, int flags, int mask) {
|
||||
window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class MicroGSupport {
|
||||
Toast.makeText(context, str("microg_not_installed_warning"), Toast.LENGTH_LONG).show();
|
||||
|
||||
var intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.setData(Uri.parse(VANCED_MICROG_DOWNLOAD_LINK));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class SpoofAppVersionPatch {
|
||||
|
||||
public static String getYouTubeVersionOverride(String version) {
|
||||
if (SettingsEnum.SPOOF_APP_VERSION.getBoolean()){
|
||||
// Override with the most recent version that does not show the new UI player layout.
|
||||
// If the new UI shows up for some users, then change this to an older version (such as 17.29.34).
|
||||
return "17.30.34";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
}
|
||||
@@ -254,9 +254,11 @@ public class ReturnYouTubeDislike {
|
||||
}
|
||||
replacementSpannable = newSpannableWithDislikes(oldSpannable, voteData);
|
||||
} else {
|
||||
String leftSegmentedSeparatorString = ReVancedUtils.isRightToLeftTextLayout() ? "\u200F| " : "| ";
|
||||
final boolean useCompactLayout = SettingsEnum.RYD_USE_COMPACT_LAYOUT.getBoolean();
|
||||
// if compact layout, use a "half space" character
|
||||
String middleSegmentedSeparatorString = useCompactLayout ? "\u2009 • \u2009" : " • ";
|
||||
|
||||
if (oldLikesString.contains(leftSegmentedSeparatorString)) {
|
||||
if (oldLikesString.contains(middleSegmentedSeparatorString)) {
|
||||
return false; // dislikes was previously added
|
||||
}
|
||||
|
||||
@@ -287,14 +289,11 @@ public class ReturnYouTubeDislike {
|
||||
} else {
|
||||
Spannable likesSpan = newSpanUsingStylingOfAnotherSpan(oldSpannable, oldLikesString);
|
||||
|
||||
// left and middle separator
|
||||
String middleSegmentedSeparatorString = " • ";
|
||||
Spannable leftSeparatorSpan = newSpanUsingStylingOfAnotherSpan(oldSpannable, leftSegmentedSeparatorString);
|
||||
// middle separator
|
||||
Spannable middleSeparatorSpan = newSpanUsingStylingOfAnotherSpan(oldSpannable, middleSegmentedSeparatorString);
|
||||
final int separatorColor = ThemeHelper.isDarkTheme()
|
||||
? 0x37A0A0A0 // transparent dark gray
|
||||
? 0x29AAAAAA // transparent dark gray
|
||||
: 0xFFD9D9D9; // light gray
|
||||
addSpanStyling(leftSeparatorSpan, new ForegroundColorSpan(separatorColor));
|
||||
addSpanStyling(middleSeparatorSpan, new ForegroundColorSpan(separatorColor));
|
||||
CharacterStyle noAntiAliasingStyle = new CharacterStyle() {
|
||||
@Override
|
||||
@@ -302,43 +301,49 @@ public class ReturnYouTubeDislike {
|
||||
tp.setAntiAlias(false); // draw without anti-aliasing, to give a sharper edge
|
||||
}
|
||||
};
|
||||
addSpanStyling(leftSeparatorSpan, noAntiAliasingStyle);
|
||||
addSpanStyling(middleSeparatorSpan, noAntiAliasingStyle);
|
||||
|
||||
Spannable dislikeSpan = newSpannableWithDislikes(oldSpannable, voteData);
|
||||
|
||||
// Increase the size of the left separator, so it better matches the stock separator on the right.
|
||||
// But when using a larger font, the entire span (including the like/dislike text) becomes shifted downward.
|
||||
// To correct this, use additional spans to move the alignment back upward by a relative amount.
|
||||
setSegmentedAdjustmentValues();
|
||||
class RelativeVerticalOffsetSpan extends CharacterStyle {
|
||||
final float relativeVerticalShiftRatio;
|
||||
|
||||
RelativeVerticalOffsetSpan(float relativeVerticalShiftRatio) {
|
||||
this.relativeVerticalShiftRatio = relativeVerticalShiftRatio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint tp) {
|
||||
tp.baselineShift -= (int) (relativeVerticalShiftRatio * tp.getFontMetrics().top);
|
||||
}
|
||||
}
|
||||
// shift everything up, to compensate for the vertical movement caused by the font change below
|
||||
// each section needs it's own Relative span, otherwise alignment is wrong
|
||||
addSpanStyling(leftSeparatorSpan, new RelativeVerticalOffsetSpan(segmentedLeftSeparatorVerticalShiftRatio));
|
||||
|
||||
addSpanStyling(likesSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
addSpanStyling(middleSeparatorSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
addSpanStyling(dislikeSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
|
||||
// important: must add size scaling after vertical offset (otherwise alignment gets off)
|
||||
addSpanStyling(leftSeparatorSpan, new RelativeSizeSpan(segmentedLeftSeparatorFontRatio));
|
||||
addSpanStyling(leftSeparatorSpan, new ScaleXSpan(segmentedLeftSeparatorHorizontalScaleRatio));
|
||||
// middle separator does not need resizing
|
||||
|
||||
// put everything together
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
builder.append(leftSeparatorSpan);
|
||||
|
||||
if (!useCompactLayout) {
|
||||
String leftSegmentedSeparatorString = ReVancedUtils.isRightToLeftTextLayout() ? "\u200F| " : "| ";
|
||||
Spannable leftSeparatorSpan = newSpanUsingStylingOfAnotherSpan(oldSpannable, leftSegmentedSeparatorString);
|
||||
addSpanStyling(leftSeparatorSpan, new ForegroundColorSpan(separatorColor));
|
||||
addSpanStyling(leftSeparatorSpan, noAntiAliasingStyle);
|
||||
|
||||
// Use a left separator with a larger font and visually match the stock right separator.
|
||||
// But with a larger font, the entire span (including the like/dislike text) becomes shifted downward.
|
||||
// To correct this, use additional spans to move the alignment back upward by a relative amount.
|
||||
setSegmentedAdjustmentValues();
|
||||
class RelativeVerticalOffsetSpan extends CharacterStyle {
|
||||
final float relativeVerticalShiftRatio;
|
||||
|
||||
RelativeVerticalOffsetSpan(float relativeVerticalShiftRatio) {
|
||||
this.relativeVerticalShiftRatio = relativeVerticalShiftRatio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint tp) {
|
||||
tp.baselineShift -= (int) (relativeVerticalShiftRatio * tp.getFontMetrics().top);
|
||||
}
|
||||
}
|
||||
// each section needs it's own Relative span, otherwise alignment is wrong
|
||||
addSpanStyling(leftSeparatorSpan, new RelativeVerticalOffsetSpan(segmentedLeftSeparatorVerticalShiftRatio));
|
||||
|
||||
addSpanStyling(likesSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
addSpanStyling(middleSeparatorSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
addSpanStyling(dislikeSpan, new RelativeVerticalOffsetSpan(segmentedVerticalShiftRatio));
|
||||
|
||||
// important: must add size scaling after vertical offset (otherwise alignment gets off)
|
||||
addSpanStyling(leftSeparatorSpan, new RelativeSizeSpan(segmentedLeftSeparatorFontRatio));
|
||||
addSpanStyling(leftSeparatorSpan, new ScaleXSpan(segmentedLeftSeparatorHorizontalScaleRatio));
|
||||
// middle separator does not need resizing
|
||||
|
||||
builder.append(leftSeparatorSpan);
|
||||
}
|
||||
|
||||
builder.append(likesSpan);
|
||||
builder.append(middleSeparatorSpan);
|
||||
builder.append(dislikeSpan);
|
||||
@@ -369,9 +374,9 @@ public class ReturnYouTubeDislike {
|
||||
LogHelper.printDebug(() -> "Device manufacturer: '" + deviceManufacturer + "' SDK: " + deviceSdkVersion);
|
||||
|
||||
//
|
||||
// IMPORTANT: configurations must be with the default system font size setting.
|
||||
// Important: configurations must be with the device default system font, and default font size.
|
||||
//
|
||||
// In generally, a single configuration will give perfect layout for all devices of the same manufacturer
|
||||
// In general, a single configuration will give perfect layout for all devices of the same manufacturer.
|
||||
final String configManufacturer;
|
||||
final int configSdk;
|
||||
switch (deviceManufacturer) {
|
||||
@@ -394,7 +399,7 @@ public class ReturnYouTubeDislike {
|
||||
segmentedLeftSeparatorHorizontalScaleRatio = 0.7f;
|
||||
break;
|
||||
case "OnePlus":
|
||||
configManufacturer = "oneplus";
|
||||
configManufacturer = "OnePlus";
|
||||
configSdk = 33;
|
||||
// tested on OnePlus 8 Pro
|
||||
segmentedLeftSeparatorVerticalShiftRatio = -0.075f;
|
||||
@@ -402,7 +407,6 @@ public class ReturnYouTubeDislike {
|
||||
segmentedLeftSeparatorFontRatio = 1.87f;
|
||||
segmentedLeftSeparatorHorizontalScaleRatio = 0.50f;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
LogHelper.printDebug(() -> "Using layout adjustments based on manufacturer: '" + configManufacturer + "' SDK: " + configSdk);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package app.revanced.integrations.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -68,6 +67,7 @@ public enum SettingsEnum {
|
||||
DISABLE_STARTUP_SHORTS_PLAYER("revanced_startup_shorts_player_enabled", false, ReturnType.BOOLEAN),
|
||||
PLAYER_POPUP_PANELS("revanced_player_popup_panels_enabled", false, ReturnType.BOOLEAN),
|
||||
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", false, ReturnType.BOOLEAN, true),
|
||||
SPOOF_APP_VERSION("revanced_spoof_app_version", false, ReturnType.BOOLEAN, true),
|
||||
WIDE_SEARCHBAR("revanced_wide_searchbar", false, ReturnType.BOOLEAN, true),
|
||||
HIDE_ALBUM_CARDS("revanced_hide_album_cards", false, ReturnType.BOOLEAN, true),
|
||||
HIDE_ARTIST_CARD("revanced_hide_artist_card", false, ReturnType.BOOLEAN),
|
||||
@@ -126,6 +126,7 @@ public enum SettingsEnum {
|
||||
RYD_USER_ID("ryd_userId", null, SharedPrefHelper.SharedPrefNames.RYD, ReturnType.STRING),
|
||||
RYD_ENABLED("ryd_enabled", true, SharedPrefHelper.SharedPrefNames.RYD, ReturnType.BOOLEAN),
|
||||
RYD_SHOW_DISLIKE_PERCENTAGE("ryd_show_dislike_percentage", false, SharedPrefHelper.SharedPrefNames.RYD, ReturnType.BOOLEAN),
|
||||
RYD_USE_COMPACT_LAYOUT("ryd_use_compact_layout", false, SharedPrefHelper.SharedPrefNames.RYD, ReturnType.BOOLEAN),
|
||||
|
||||
// SponsorBlock settings
|
||||
SB_ENABLED("sb-enabled", true, SharedPrefHelper.SharedPrefNames.SPONSOR_BLOCK, ReturnType.BOOLEAN),
|
||||
@@ -342,19 +343,19 @@ public enum SettingsEnum {
|
||||
|
||||
switch (getReturnType()) {
|
||||
case FLOAT:
|
||||
SharedPrefHelper.saveFloat(sharedPref, path, (float) defaultValue);
|
||||
SharedPrefHelper.saveFloat(sharedPref, path, (float) newValue);
|
||||
break;
|
||||
case LONG:
|
||||
SharedPrefHelper.saveLong(sharedPref, path, (long) defaultValue);
|
||||
SharedPrefHelper.saveLong(sharedPref, path, (long) newValue);
|
||||
break;
|
||||
case BOOLEAN:
|
||||
SharedPrefHelper.saveBoolean(sharedPref, path, (boolean) newValue);
|
||||
break;
|
||||
case INTEGER:
|
||||
SharedPrefHelper.saveInt(sharedPref, path, (int) defaultValue);
|
||||
SharedPrefHelper.saveInt(sharedPref, path, (int) newValue);
|
||||
break;
|
||||
case STRING:
|
||||
SharedPrefHelper.saveString(sharedPref, path, (String) defaultValue);
|
||||
SharedPrefHelper.saveString(sharedPref, path, (String) newValue);
|
||||
break;
|
||||
default:
|
||||
LogHelper.printException(() -> ("Setting does not have a valid Type. Name is: " + name()));
|
||||
|
||||
@@ -29,18 +29,27 @@ public class ReturnYouTubeDislikeSettingsFragment extends PreferenceFragment {
|
||||
*/
|
||||
private SwitchPreference percentagePreference;
|
||||
|
||||
/**
|
||||
* If segmented like/dislike button uses smaller compact layout
|
||||
*/
|
||||
private SwitchPreference compactLayoutPreference;
|
||||
|
||||
private void updateUIState() {
|
||||
final boolean rydIsEnabled = SettingsEnum.RYD_ENABLED.getBoolean();
|
||||
final boolean dislikePercentageEnabled = SettingsEnum.RYD_SHOW_DISLIKE_PERCENTAGE.getBoolean();
|
||||
|
||||
enabledPreference.setSummary(rydIsEnabled
|
||||
? str("revanced_ryd_enable_summary_on")
|
||||
: str("revanced_ryd_enable_summary_off"));
|
||||
|
||||
percentagePreference.setSummary(dislikePercentageEnabled
|
||||
percentagePreference.setSummary(SettingsEnum.RYD_SHOW_DISLIKE_PERCENTAGE.getBoolean()
|
||||
? str("revanced_ryd_dislike_percentage_summary_on")
|
||||
: str("revanced_ryd_dislike_percentage_summary_off"));
|
||||
percentagePreference.setEnabled(rydIsEnabled);
|
||||
|
||||
compactLayoutPreference.setSummary(SettingsEnum.RYD_USE_COMPACT_LAYOUT.getBoolean()
|
||||
? str("revanced_ryd_compact_layout_summary_on")
|
||||
: str("revanced_ryd_compact_layout_summary_off"));
|
||||
compactLayoutPreference.setEnabled(rydIsEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,6 +89,19 @@ public class ReturnYouTubeDislikeSettingsFragment extends PreferenceFragment {
|
||||
});
|
||||
preferenceScreen.addPreference(percentagePreference);
|
||||
|
||||
compactLayoutPreference = new SwitchPreference(context);
|
||||
compactLayoutPreference.setKey(SettingsEnum.RYD_USE_COMPACT_LAYOUT.getPath());
|
||||
compactLayoutPreference.setDefaultValue(SettingsEnum.RYD_USE_COMPACT_LAYOUT.getDefaultValue());
|
||||
compactLayoutPreference.setChecked(SettingsEnum.RYD_USE_COMPACT_LAYOUT.getBoolean());
|
||||
compactLayoutPreference.setTitle(str("revanced_ryd_compact_layout_title"));
|
||||
compactLayoutPreference.setOnPreferenceChangeListener((pref, newValue) -> {
|
||||
SettingsEnum.RYD_USE_COMPACT_LAYOUT.saveValue((Boolean)newValue);
|
||||
|
||||
updateUIState();
|
||||
return true;
|
||||
});
|
||||
preferenceScreen.addPreference(compactLayoutPreference);
|
||||
|
||||
updateUIState();
|
||||
|
||||
|
||||
|
||||
@@ -133,12 +133,15 @@ public class ReVancedUtils {
|
||||
return context.getResources().getConfiguration().smallestScreenWidthDp >= 600;
|
||||
}
|
||||
|
||||
private static final boolean isRightToLeftTextLayout =
|
||||
new Bidi(Locale.getDefault().getDisplayLanguage(), Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT).isRightToLeft();
|
||||
private static Boolean isRightToLeftTextLayout;
|
||||
/**
|
||||
* If the device language uses right to left text layout (hebrew, arabic, etc)
|
||||
*/
|
||||
public static boolean isRightToLeftTextLayout() {
|
||||
if (isRightToLeftTextLayout == null) {
|
||||
String displayLanguage = Locale.getDefault().getDisplayLanguage();
|
||||
isRightToLeftTextLayout = new Bidi(displayLanguage, Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT).isRightToLeft();
|
||||
}
|
||||
return isRightToLeftTextLayout;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.gradle.jvmargs = -Xmx2048m
|
||||
android.useAndroidX = true
|
||||
version = 0.92.2-dev.1
|
||||
version = 0.93.2-dev.1
|
||||
|
||||
Reference in New Issue
Block a user