1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-22 05:02:19 +01:00

feat(Tiktok - Playback speed): Remember playback speed (#543)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
d4rkk3y 2024-01-10 15:17:58 +07:00 committed by GitHub
parent 490af75452
commit 21ced14791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import static java.lang.Boolean.TRUE;
import app.revanced.integrations.shared.settings.BaseSettings;
import app.revanced.integrations.shared.settings.BooleanSetting;
import app.revanced.integrations.shared.settings.FloatSetting;
import app.revanced.integrations.shared.settings.StringSetting;
public class Settings extends BaseSettings {
@ -17,6 +18,7 @@ public class Settings extends BaseSettings {
public static final StringSetting DOWNLOAD_PATH = new StringSetting("down_path", "DCIM/TikTok");
public static final BooleanSetting DOWNLOAD_WATERMARK = new BooleanSetting("down_watermark", TRUE);
public static final BooleanSetting CLEAR_DISPLAY = new BooleanSetting("clear_display", FALSE);
public static final FloatSetting REMEMBERED_SPEED = new FloatSetting("REMEMBERED_SPEED", 1.0f);
public static final BooleanSetting SIM_SPOOF = new BooleanSetting("simspoof", TRUE, true);
public static final StringSetting SIM_SPOOF_ISO = new StringSetting("simspoof_iso", "us");
public static final StringSetting SIMSPOOF_MCCMNC = new StringSetting("simspoof_mccmnc", "310160");

View File

@ -0,0 +1,13 @@
package app.revanced.integrations.tiktok.speed;
import app.revanced.integrations.tiktok.settings.Settings;
public class PlaybackSpeedPatch {
public static void rememberPlaybackSpeed(float newSpeed) {
Settings.REMEMBERED_SPEED.save(newSpeed);
}
public static float getPlaybackSpeed() {
return Settings.REMEMBERED_SPEED.get();
}
}