Skip to content

Commit

Permalink
added pref disableanimstickers to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlbo committed Jun 8, 2022
1 parent 0434f06 commit dd6abaf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/ru/vtosters/lite/utils/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ public static boolean roundedmsgs() {
return getBoolValue("roundedmsgs", false);
}

public static boolean disableanimstickers() {
return getBoolValue("disableanimstickers", true);
}

public static boolean donaterecomm() {
return getBoolValue("donaterecomm", false);
}
Expand Down
4 changes: 4 additions & 0 deletions smali/res/xml/preferences_debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
android:entryValues="@array/lang_value"
android:key="lang_value"
android:title="@string/debug_experimental_language" />
<com.vtosters.lite.ui.MaterialSwitchPreference
android:defaultValue="true"
android:key="disableanimstickers"
android:title="Disable anim stickers + suggestions" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/debug_developer_functions">
<com.vtosters.lite.ui.MaterialSwitchPreference
Expand Down
26 changes: 22 additions & 4 deletions smali/smali_classes4/com/vk/stickers/Stickers.smali
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,17 @@
.method private F()Z
.locals 2

invoke-static {}, Lru/vtosters/lite/utils/Preferences;->disableanimstickers()Z

move-result v0

if-eqz v0, :cond_228

const v0, 0x0 ## nedofix anim stickers

return v0

:cond_228
const-string v0, "stickers"

const-string v1, "animation_enabled"
Expand All @@ -298,8 +309,6 @@

move-result v0

const v0, 0x0 ## nedofix anim stickers

return v0
.end method

Expand Down Expand Up @@ -2551,6 +2560,17 @@
.method public n()Z
.locals 2

invoke-static {}, Lru/vtosters/lite/utils/Preferences;->disableanimstickers()Z

move-result v0

if-eqz v0, :cond_228

const v0, 0x0 ## nedofix anim stickers

return v0

:cond_228
const-string v0, "stickers"

const-string v1, "suggests_enabled"
Expand All @@ -2560,8 +2580,6 @@

move-result v0

const v0, 0x0 ## nedofix anim stickers

return v0
.end method

Expand Down

0 comments on commit dd6abaf

Please sign in to comment.