experimental clear display patch
This commit is contained in:
parent
6c2b836aa8
commit
84a73e730f
3 changed files with 94 additions and 31 deletions
|
|
@ -4,10 +4,22 @@ import app.revanced.extension.tiktok.settings.Settings;
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
public class RememberClearDisplayPatch {
|
||||
|
||||
private static Boolean cachedState = null;
|
||||
|
||||
public static boolean getClearDisplayState() {
|
||||
return Settings.CLEAR_DISPLAY.get();
|
||||
if (cachedState == null) {
|
||||
cachedState = Settings.CLEAR_DISPLAY.get();
|
||||
}
|
||||
return cachedState;
|
||||
}
|
||||
|
||||
public static void rememberClearDisplayState(boolean newState) {
|
||||
if (cachedState != null && cachedState == newState) {
|
||||
return;
|
||||
}
|
||||
|
||||
cachedState = newState;
|
||||
Settings.CLEAR_DISPLAY.save(newState);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue