From 4c498e14a13f3510d7c6a33a3d87b77463f780a1 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Sun, 20 Jan 2019 02:35:36 +0300 Subject: [PATCH] Add experiments patch~ --- patches/experiments/832.diff | 152 ++++++++++++++++++++++++++++++++++ patches/experiments/README.md | 10 +++ 2 files changed, 162 insertions(+) create mode 100644 patches/experiments/832.diff create mode 100644 patches/experiments/README.md diff --git a/patches/experiments/832.diff b/patches/experiments/832.diff new file mode 100644 index 00000000..b1e682dc --- /dev/null +++ b/patches/experiments/832.diff @@ -0,0 +1,152 @@ +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali com.discord-832/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali +*** com.discord-832-base/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali 2019-01-19 04:41:50.793096443 +0300 +--- com.discord-832/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali 2019-01-20 02:25:56.947114965 +0300 +*************** +*** 81,108 **** + .method public final call(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelGuild;)Z + .locals 1 + +- const-string v0, "meUser" +- +- .line 93 +- invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V +- +- invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->isStaff()Z +- +- move-result p1 +- +- if-nez p1, :cond_1 +- +- if-eqz p2, :cond_0 +- +- goto :goto_0 +- +- :cond_0 +- const/4 p1, 0x0 +- +- return p1 +- +- :cond_1 +- :goto_0 + const/4 p1, 0x1 + + return p1 +--- 81,86 ---- +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali com.discord-832/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali +*** com.discord-832-base/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali 2019-01-19 04:41:50.793096443 +0300 +--- com.discord-832/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali 2019-01-20 02:30:18.981896059 +0300 +*************** +*** 77,90 **** + .method public final call(Lcom/discord/models/domain/ModelUser;)Z + .locals 1 + +! const-string v0, "it" +! +! .line 78 +! invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V +! +! invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->isStaff()Z +! +! move-result p1 + + return p1 + .end method +--- 77,83 ---- + .method public final call(Lcom/discord/models/domain/ModelUser;)Z + .locals 1 + +! const/4 p1, 0x1 + + return p1 + .end method +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/stores/StoreExperiments.smali com.discord-832/smali/com/discord/stores/StoreExperiments.smali +*** com.discord-832-base/smali/com/discord/stores/StoreExperiments.smali 2019-01-19 04:41:50.796429793 +0300 +--- com.discord-832/smali/com/discord/stores/StoreExperiments.smali 2019-01-20 02:21:41.862372281 +0300 +*************** +*** 1247,1255 **** + + if-eqz v0, :cond_0 + +! invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser$Me;->isStaff()Z +! +! move-result v0 + + if-eq v0, v1, :cond_1 + +--- 1247,1253 ---- + + if-eqz v0, :cond_0 + +! const/4 v0, 0x1 + + if-eq v0, v1, :cond_1 + +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali com.discord-832/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali +*** com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali 2019-01-19 04:41:50.846430038 +0300 +--- com.discord-832/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali 2019-01-20 02:28:45.741380899 +0300 +*************** +*** 71,83 **** + + check-cast v0, Landroid/view/View; + +! const-string v1, "it" +! +! invoke-static {p1, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V +! +! invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->isStaff()Z +! +! move-result p1 + + invoke-static {v0, p1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy(Landroid/view/View;Z)V + +--- 71,77 ---- + + check-cast v0, Landroid/view/View; + +! const/4 p1, 0x1 + + invoke-static {v0, p1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy(Landroid/view/View;Z)V + +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettings.smali com.discord-832/smali/com/discord/widgets/settings/WidgetSettings.smali +*** com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettings.smali 2019-01-19 04:41:50.846430038 +0300 +--- com.discord-832/smali/com/discord/widgets/settings/WidgetSettings.smali 2019-01-20 02:30:08.458504584 +0300 +*************** +*** 707,715 **** + if-eqz p1, :cond_1 + + .line 109 +! invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->isStaff()Z +! +! move-result v2 + + if-eq v2, v1, :cond_0 + +--- 707,713 ---- + if-eqz p1, :cond_1 + + .line 109 +! const/4 v2, 0x1 + + if-eq v2, v1, :cond_0 + +diff -crB -x dist -x build com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettingsUserConnections$UserConnectionItem.smali com.discord-832/smali/com/discord/widgets/settings/WidgetSettingsUserConnections$UserConnectionItem.smali +*** com.discord-832-base/smali/com/discord/widgets/settings/WidgetSettingsUserConnections$UserConnectionItem.smali 2019-01-19 04:41:50.849763388 +0300 +--- com.discord-832/smali/com/discord/widgets/settings/WidgetSettingsUserConnections$UserConnectionItem.smali 2019-01-20 02:17:36.007680584 +0300 +*************** +*** 80,87 **** + .method public final isStaffOrTester()Z + .locals 1 + +! .line 102 +! iget-boolean v0, p0, Lcom/discord/widgets/settings/WidgetSettingsUserConnections$UserConnectionItem;->isStaffOrTester:Z + + return v0 + .end method +--- 80,86 ---- + .method public final isStaffOrTester()Z + .locals 1 + +! const/4 v0, 0x1 + + return v0 + .end method diff --git a/patches/experiments/README.md b/patches/experiments/README.md new file mode 100644 index 00000000..a502ed8c --- /dev/null +++ b/patches/experiments/README.md @@ -0,0 +1,10 @@ +## DisTok CutTheCord: Experiments Patch + +This patch enables developer options (empty), mobile experiments (of which there's none) and the secret AMOLED theme (which is shit). + +#### Bugs / Side effects +- Discord banned people for using experiments before. Don't show stuff this publicly. + +#### Available and tested on: +- 8.3.2 +