no-mobileindicator: Finally fix no-mobileindicator

Closes #72
This commit is contained in:
ave 2020-07-29 23:34:57 +03:00
parent 6de3dd6e9b
commit 393bc9f5f7
Signed by untrusted user: a
GPG key ID: 398DD7BD03276F6D
2 changed files with 90 additions and 15 deletions

View file

@ -1,20 +1,96 @@
diff -crB from/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali to/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali Only in com.discord: build
*** from/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali 2020-06-20 04:18:51.683371812 +0100 Only in com.discord: dist
--- to/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali 2020-06-20 04:19:01.317301433 +0100 diff --color -crB com.discord-base/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali
*** com.discord-base/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali 2020-07-29 21:27:28.163447492 +0300
--- com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali 2020-07-29 23:32:55.123412443 +0300
*************** ***************
*** 176,182 **** *** 317,387 ****
.end method
const-string v2, "browser" .method private final setSuperProperties(Ljava/util/Map;)V
! .locals 3
! .annotation system Ldalvik/annotation/Signature;
! value = {
! "(",
! "Ljava/util/Map<",
! "Ljava/lang/String;",
! "+",
! "Ljava/lang/Object;",
! ">;)V"
! }
! .end annotation
!
! sget-object v0, Lcom/discord/utilities/analytics/AnalyticSuperProperties;->superProperties$delegate:Lkotlin/properties/ReadWriteProperty;
!
! sget-object v1, Lcom/discord/utilities/analytics/AnalyticSuperProperties;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
!
! const/4 v2, 0x0
!
! aget-object v1, v1, v2
!
! invoke-interface {v0, p0, v1, p1}, Lkotlin/properties/ReadWriteProperty;->setValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V
! const-string v3, "Discord Android" return-void
.end method
invoke-direct {v1, v2, v3}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V .method private final declared-synchronized updateSuperProperties(Ljava/util/Map;)V
! .locals 1
! .annotation system Ldalvik/annotation/Signature;
! value = {
! "(",
! "Ljava/util/Map<",
! "Ljava/lang/String;",
! "+",
! "Ljava/lang/Object;",
! ">;)V"
! }
! .end annotation
!
! monitor-enter p0
!
! .line 1
! :try_start_0
! invoke-virtual {p0}, Lcom/discord/utilities/analytics/AnalyticSuperProperties;->getSuperProperties()Ljava/util/Map;
!
! move-result-object v0
!
! invoke-static {v0, p1}, Lf/n/a/k/a;->plus(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
!
! move-result-object p1
!
! invoke-direct {p0, p1}, Lcom/discord/utilities/analytics/AnalyticSuperProperties;->setSuperProperties(Ljava/util/Map;)V
! :try_end_0
! .catchall {:try_start_0 .. :try_end_0} :catchall_0
!
! .line 2
! monitor-exit p0
--- 176,182 ---- return-void
-
- :catchall_0
- move-exception p1
-
- monitor-exit p0
-
- throw p1
.end method
const-string v2, "browser"
! const-string v3, "Discord Client" --- 317,331 ----
.end method
invoke-direct {v1, v2, v3}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V .method private final setSuperProperties(Ljava/util/Map;)V
! .locals 0
return-void
.end method
.method private final declared-synchronized updateSuperProperties(Ljava/util/Map;)V
! .locals 0
return-void
.end method
Only in com.discord/smali/com/discord/utilities/analytics: AnalyticSuperProperties.smali.orig

View file

@ -1,12 +1,11 @@
## DisTok CutTheCord: Disable Mobile Indicator Patch ## DisTok CutTheCord: Disable Mobile Indicator Patch
This patch replaces the browser name from "Discord Android" to "Discord Client", disabling the Mobile Indicator which is a privacy violation without an explicit opt-out option. Between 8.3.0 and 33.1: This patch replaces the browser name from "Discord Android" to "Discord Client", disabling the Mobile Indicator which is a privacy violation without an explicit opt-out option.
However, this causes some issues. See the `Bugs / Side effects` list below. 33.1+: This disables SuperProperties, which causes mobile indicator to be not displayed.
#### Bugs / Side effects #### Bugs / Side effects
- CRITICAL: Push notifications are broken - CRITICAL (8.3.0-33.1): Push notifications are broken
- NOTE: This is really obvious on discord's end, and may be bannable.
#### Available and tested on: #### Available and tested on:
- 8.3.0 - 8.3.0