experiments: port to v8.3.6

I wanted to commit this individually because the change is interesting.
They moved isStaffOrTester from WidgetSettingsUserConnections$UserConnectionItem.smali to isStaff on StoreExperiments$ExperimentAndStaff.smali.

I think this change makes a lot of sense and clears up the mess in the code. Good on you, discord.
This commit is contained in:
ave 2019-01-31 10:48:14 +03:00
parent a833dbd2bb
commit ff452978ca
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
2 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,153 @@
diff -crB -x dist -x build com.discord-836-testing/smali/com/discord/stores/StoreExperiments$ExperimentAndStaff.smali com.discord-836/smali/com/discord/stores/StoreExperiments$ExperimentAndStaff.smali
*** com.discord-836-testing/smali/com/discord/stores/StoreExperiments$ExperimentAndStaff.smali 2019-01-31 10:40:04.832616590 +0300
--- com.discord-836/smali/com/discord/stores/StoreExperiments$ExperimentAndStaff.smali 2019-01-31 10:46:57.884275454 +0300
***************
*** 212,219 ****
.method public final isStaff()Z
.locals 1
! .line 253
! iget-boolean v0, p0, Lcom/discord/stores/StoreExperiments$ExperimentAndStaff;->isStaff:Z
return v0
.end method
--- 212,218 ----
.method public final isStaff()Z
.locals 1
! const/4 v0, 0x1
return v0
.end method
diff -crB -x dist -x build com.discord-836-testing/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali com.discord-836/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali
*** com.discord-836-testing/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali 2019-01-31 10:40:04.832616590 +0300
--- com.discord-836/smali/com/discord/stores/StoreExperiments$getExperimentalAlpha$1.smali 2019-01-31 10:44:31.183674768 +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-836-testing/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali com.discord-836/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali
*** com.discord-836-testing/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali 2019-01-31 10:40:04.832616590 +0300
--- com.discord-836/smali/com/discord/stores/StoreExperiments$getExperimentAndStaff$1.smali 2019-01-31 10:44:31.183674768 +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-836-testing/smali/com/discord/stores/StoreExperiments.smali com.discord-836/smali/com/discord/stores/StoreExperiments.smali
*** com.discord-836-testing/smali/com/discord/stores/StoreExperiments.smali 2019-01-31 10:40:04.832616590 +0300
--- com.discord-836/smali/com/discord/stores/StoreExperiments.smali 2019-01-31 10:44:31.183674768 +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-836-testing/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali com.discord-836/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali
*** com.discord-836-testing/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali 2019-01-31 10:40:04.895950170 +0300
--- com.discord-836/smali/com/discord/widgets/settings/WidgetSettingsAppearance$onViewBoundOrOnResume$1.smali 2019-01-31 10:44:31.183674768 +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-836-testing/smali/com/discord/widgets/settings/WidgetSettings.smali com.discord-836/smali/com/discord/widgets/settings/WidgetSettings.smali
*** com.discord-836-testing/smali/com/discord/widgets/settings/WidgetSettings.smali 2019-01-31 10:40:04.892616823 +0300
--- com.discord-836/smali/com/discord/widgets/settings/WidgetSettings.smali 2019-01-31 10:44:31.187008115 +0300
***************
*** 711,719 ****
if-eqz v0, :cond_1
! invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->isStaff()Z
!
! move-result v0
if-eq v0, v2, :cond_0
--- 711,717 ----
if-eqz v0, :cond_1
! const/4 v0, 0x1
if-eq v0, v2, :cond_0

View file

@ -10,4 +10,5 @@ This patch enables developer options (empty), mobile experiments (of which there
- 8.3.3 - 8.3.3
- 8.3.4g - 8.3.4g
- 8.3.5g - 8.3.5g
- 8.3.6g