noprofilestrip: change patch approach (untested)

Hopefully fixes #18
This commit is contained in:
ave 2019-02-08 11:42:53 +03:00
parent c5a4c4b05a
commit fa7a424746
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -1,29 +1,384 @@
diff -crB -x dist -x build com.discord-842-base/res/layout/widget_user_profile_strip.xml com.discord-842/res/layout/widget_user_profile_strip.xml diff -crB -x dist -x build com.discord-844-base/smali/com/discord/app/App.smali com.discord-844/smali/com/discord/app/App.smali
*** com.discord-842-base/res/layout/widget_user_profile_strip.xml 2019-02-05 03:12:32.399764040 +0300 *** com.discord-844-base/smali/com/discord/app/App.smali 2019-02-08 11:20:05.641536172 +0300
--- com.discord-842/res/layout/widget_user_profile_strip.xml 2019-02-06 00:48:43.768078629 +0300 --- com.discord-844/smali/com/discord/app/App.smali 2019-02-08 11:28:39.756852436 +0300
*************** ***************
*** 8,15 **** *** 218,224 ****
<FrameLayout android:background="?primary_630_circle" android:padding="@dimen/uikit_image_border_size_small" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="@id/image_bottom_guideline" app:layout_constraintEnd_toEndOf="@id/image_bottom_guideline" app:layout_constraintRight_toRightOf="@id/image_bottom_guideline">
<com.facebook.drawee.view.SimpleDraweeView android:id="@id/profile_strip_status" android:layout_width="10.0dip" android:layout_height="10.0dip" app:placeholderImage="@color/status_grey_500" app:roundAsCircle="true" /> invoke-virtual {v0, v1}, Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;->init(Lkotlin/jvm/functions/Function2;)Lkotlin/Unit;
</FrameLayout>
- <TextView android:textSize="@dimen/uikit_textsize_large" android:textColor="@color/primary_100" android:ellipsize="end" android:id="@id/profile_strip_name" android:layout_width="0.0dip" android:singleLine="true" app:layout_constraintBottom_toTopOf="@id/profile_strip_discriminator" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_chainStyle="packed" style="@style/UiKit.TextView.Semibold" /> ! const-string v0, "https://cdn.discordapp.com"
- <TextView android:id="@id/profile_strip_discriminator" android:layout_width="0.0dip" android:singleLine="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintTop_toBottomOf="@id/profile_strip_name" style="@style/UiKit.TextView.Subtext.Semibold" />
</androidx.constraintlayout.widget.ConstraintLayout> .line 75
<ImageView android:id="@id/profile_strip_search" android:src="@drawable/ic_search_items_white_a60_24dp" android:contentDescription="@string/search_recent" style="@style/UiKit.Profile.Strip.Icon" /> invoke-static {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->setCdnUri(Ljava/lang/String;)V
<ImageView android:id="@id/profile_strip_mentions" android:src="@drawable/ic_mentions_white_a60_24dp" android:contentDescription="@string/mentions" style="@style/UiKit.Profile.Strip.Icon" /> --- 218,224 ----
--- 8,13 ----
diff -crB -x dist -x build com.discord-842-base/res/layout-v17/widget_user_profile_strip.xml com.discord-842/res/layout-v17/widget_user_profile_strip.xml invoke-virtual {v0, v1}, Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;->init(Lkotlin/jvm/functions/Function2;)Lkotlin/Unit;
*** com.discord-842-base/res/layout-v17/widget_user_profile_strip.xml 2019-02-05 03:12:33.223101284 +0300
--- com.discord-842/res/layout-v17/widget_user_profile_strip.xml 2019-02-06 00:46:33.070827359 +0300 ! const-string v0, "https://dev.litecord.top"
***************
*** 8,15 **** .line 75
<FrameLayout android:background="?primary_630_circle" android:padding="@dimen/uikit_image_border_size_small" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="@id/image_bottom_guideline" app:layout_constraintEnd_toEndOf="@id/image_bottom_guideline" app:layout_constraintRight_toRightOf="@id/image_bottom_guideline"> invoke-static {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->setCdnUri(Ljava/lang/String;)V
<com.facebook.drawee.view.SimpleDraweeView android:id="@id/profile_strip_status" android:layout_width="10.0dip" android:layout_height="10.0dip" app:placeholderImage="@color/status_grey_500" app:roundAsCircle="true" /> diff -crB -x dist -x build com.discord-844-base/smali/com/discord/BuildConfig.smali com.discord-844/smali/com/discord/BuildConfig.smali
</FrameLayout> *** com.discord-844-base/smali/com/discord/BuildConfig.smali 2019-02-08 11:20:05.634869480 +0300
- <TextView android:textSize="@dimen/uikit_textsize_large" android:textColor="@color/primary_100" android:ellipsize="end" android:id="@id/profile_strip_name" android:layout_width="0.0dip" android:singleLine="true" app:layout_constraintBottom_toTopOf="@id/profile_strip_discriminator" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_chainStyle="packed" style="@style/UiKit.TextView.Semibold" /> --- com.discord-844/smali/com/discord/BuildConfig.smali 2019-02-08 11:28:39.756852436 +0300
- <TextView android:id="@id/profile_strip_discriminator" android:layout_width="0.0dip" android:singleLine="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintTop_toBottomOf="@id/profile_strip_name" style="@style/UiKit.TextView.Subtext.Semibold" /> ***************
</androidx.constraintlayout.widget.ConstraintLayout> *** 16,30 ****
<ImageView android:id="@id/profile_strip_search" android:src="@drawable/ic_search_items_white_a60_24dp" android:contentDescription="@string/search_recent" style="@style/UiKit.Profile.Strip.Icon" />
<ImageView android:id="@id/profile_strip_mentions" android:src="@drawable/ic_mentions_white_a60_24dp" android:contentDescription="@string/mentions" style="@style/UiKit.Profile.Strip.Icon" /> .field public static final FLAVOR_internalExternal:Ljava/lang/String; = "external"
--- 8,13 ----
! .field public static final HOST:Ljava/lang/String; = "https://discordapp.com"
! .field public static final HOST_API:Ljava/lang/String; = "https://discordapp.com/api/"
! .field public static final HOST_CDN:Ljava/lang/String; = "https://cdn.discordapp.com"
.field public static final HOST_GIFT:Ljava/lang/String; = "https://discord.gift"
! .field public static final HOST_INVITE:Ljava/lang/String; = "https://discord.gg"
.field public static final LOCAL_IP:Ljava/lang/String; = ""
--- 16,30 ----
.field public static final FLAVOR_internalExternal:Ljava/lang/String; = "external"
! .field public static final HOST:Ljava/lang/String; = "https://dev.litecord.top"
! .field public static final HOST_API:Ljava/lang/String; = "https://dev.litecord.top/api/"
! .field public static final HOST_CDN:Ljava/lang/String; = "https://dev.litecord.top"
.field public static final HOST_GIFT:Ljava/lang/String; = "https://discord.gift"
! .field public static final HOST_INVITE:Ljava/lang/String; = "https://dev.litecord.top"
.field public static final LOCAL_IP:Ljava/lang/String; = ""
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/gateway/GatewaySocket.smali com.discord-844/smali/com/discord/gateway/GatewaySocket.smali
*** com.discord-844-base/smali/com/discord/gateway/GatewaySocket.smali 2019-02-08 11:20:05.704869750 +0300
--- com.discord-844/smali/com/discord/gateway/GatewaySocket.smali 2019-02-08 11:28:39.756852436 +0300
***************
*** 32,38 ****
.field private static final DISCOVERING:I = 0x1
! .field private static final GATEWAY_COMPRESSION:Ljava/lang/String; = "zlib-stream"
.field private static final GATEWAY_ENCODING:Ljava/lang/String; = "json"
--- 32,38 ----
.field private static final DISCOVERING:I = 0x1
! .field private static final GATEWAY_COMPRESSION:Ljava/lang/String; = ""
.field private static final GATEWAY_ENCODING:Ljava/lang/String; = "json"
***************
*** 1033,1039 ****
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
! const-string p1, "/?encoding=json&v=6&compress=zlib-stream"
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
--- 1033,1039 ----
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
! const-string p1, "/?encoding=json&v=6"
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/gateway/io/OutgoingPayload$Identify.smali com.discord-844/smali/com/discord/gateway/io/OutgoingPayload$Identify.smali
*** com.discord-844-base/smali/com/discord/gateway/io/OutgoingPayload$Identify.smali 2019-02-08 11:20:05.694869712 +0300
--- com.discord-844/smali/com/discord/gateway/io/OutgoingPayload$Identify.smali 2019-02-08 11:28:39.756852436 +0300
***************
*** 59,64 ****
--- 59,66 ----
const/4 v0, 0x0
+ const/4 p3, 0x0
+
.line 27
invoke-direct {p0, v0}, Lcom/discord/gateway/io/OutgoingPayload;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/stores/StoreGatewayConnection.smali com.discord-844/smali/com/discord/stores/StoreGatewayConnection.smali
*** com.discord-844-base/smali/com/discord/stores/StoreGatewayConnection.smali 2019-02-08 11:20:05.958204063 +0300
--- com.discord-844/smali/com/discord/stores/StoreGatewayConnection.smali 2019-02-08 11:28:39.760185783 +0300
***************
*** 1413,1419 ****
.line 290
new-instance v10, Lcom/discord/gateway/rest/RestConfig;
! const-string v3, "https://discordapp.com/api/"
sget-object v4, Lcom/discord/utilities/rest/RestAPI$AppHeadersProvider;->INSTANCE:Lcom/discord/utilities/rest/RestAPI$AppHeadersProvider;
--- 1413,1419 ----
.line 290
new-instance v10, Lcom/discord/gateway/rest/RestConfig;
! const-string v3, "https://dev.litecord.top/api/"
sget-object v4, Lcom/discord/utilities/rest/RestAPI$AppHeadersProvider;->INSTANCE:Lcom/discord/utilities/rest/RestAPI$AppHeadersProvider;
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/utilities/icon/IconUtils.smali com.discord-844/smali/com/discord/utilities/icon/IconUtils.smali
*** com.discord-844-base/smali/com/discord/utilities/icon/IconUtils.smali 2019-02-08 11:20:06.121538027 +0300
--- com.discord-844/smali/com/discord/utilities/icon/IconUtils.smali 2019-02-08 11:28:39.760185783 +0300
***************
*** 359,365 ****
goto :goto_2
:cond_1
! const-string p3, "https://cdn.discordapp.com"
.line 109
check-cast p3, Ljava/lang/CharSequence;
--- 359,365 ----
goto :goto_2
:cond_1
! const-string p3, "https://dev.litecord.top"
.line 109
check-cast p3, Ljava/lang/CharSequence;
***************
*** 407,413 ****
:cond_3
new-instance p3, Ljava/lang/StringBuilder;
! const-string v0, "https://cdn.discordapp.com/channel-icons/"
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 407,413 ----
:cond_3
new-instance p3, Ljava/lang/StringBuilder;
! const-string v0, "https://dev.litecord.top/channel-icons/"
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
***************
*** 649,655 ****
goto :goto_1
:cond_0
! const-string p2, "https://cdn.discordapp.com"
.line 142
check-cast p2, Ljava/lang/CharSequence;
--- 649,655 ----
goto :goto_1
:cond_0
! const-string p2, "https://dev.litecord.top"
.line 142
check-cast p2, Ljava/lang/CharSequence;
***************
*** 699,705 ****
:cond_2
new-instance p2, Ljava/lang/StringBuilder;
! const-string v0, "https://cdn.discordapp.com/icons/"
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 699,705 ----
:cond_2
new-instance p2, Ljava/lang/StringBuilder;
! const-string v0, "https://dev.litecord.top/icons/"
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
***************
*** 900,906 ****
:cond_0
if-eqz p1, :cond_4
! const-string p2, "https://cdn.discordapp.com"
.line 88
check-cast p2, Ljava/lang/CharSequence;
--- 900,906 ----
:cond_0
if-eqz p1, :cond_4
! const-string p2, "https://dev.litecord.top"
.line 88
check-cast p2, Ljava/lang/CharSequence;
***************
*** 969,975 ****
:goto_1
new-instance p3, Ljava/lang/StringBuilder;
! const-string v0, "https://cdn.discordapp.com/avatars/"
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 969,975 ----
:goto_1
new-instance p3, Ljava/lang/StringBuilder;
! const-string v0, "https://dev.litecord.top/avatars/"
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
***************
*** 1837,1843 ****
.line 165
new-instance v0, Ljava/lang/StringBuilder;
! const-string v1, "https://cdn.discordapp.com/app-assets/"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 1837,1843 ----
.line 165
new-instance v0, Ljava/lang/StringBuilder;
! const-string v1, "https://dev.litecord.top/app-assets/"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/utilities/rest/RestAPI$Companion.smali com.discord-844/smali/com/discord/utilities/rest/RestAPI$Companion.smali
*** com.discord-844-base/smali/com/discord/utilities/rest/RestAPI$Companion.smali 2019-02-08 11:20:06.164871527 +0300
--- com.discord-844/smali/com/discord/utilities/rest/RestAPI$Companion.smali 2019-02-08 11:28:39.763519129 +0300
***************
*** 318,324 ****
.line 213
new-instance v0, Lcom/discord/restapi/RestAPIBuilder;
! const-string v9, "https://discordapp.com/api/"
check-cast v6, Lokhttp3/m;
--- 318,324 ----
.line 213
new-instance v0, Lcom/discord/restapi/RestAPIBuilder;
! const-string v9, "https://dev.litecord.top/api/"
check-cast v6, Lokhttp3/m;
Only in com.discord-844/smali/com/discord/utilities/rest: RestAPI$Companion.smali.orig
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali com.discord-844/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali
*** com.discord-844-base/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali 2019-02-08 11:20:06.198204990 +0300
--- com.discord-844/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali 2019-02-08 11:28:39.763519129 +0300
***************
*** 105,111 ****
:goto_1
new-instance p2, Ljava/lang/StringBuilder;
! const-string v0, "https://cdn.discordapp.com/emojis/"
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 105,111 ----
:goto_1
new-instance p2, Ljava/lang/StringBuilder;
! const-string v0, "https://dev.litecord.top/emojis/"
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali com.discord-844/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali
*** com.discord-844-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali 2019-02-08 11:20:06.424872533 +0300
--- com.discord-844/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali 2019-02-08 11:28:39.763519129 +0300
***************
*** 605,611 ****
.line 104
new-instance v1, Ljava/lang/StringBuilder;
! const-string v6, "https://cdn.discordapp.com/app-icons/"
invoke-direct {v1, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 605,611 ----
.line 104
new-instance v1, Ljava/lang/StringBuilder;
! const-string v6, "https://dev.litecord.top/app-icons/"
invoke-direct {v1, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali com.discord-844/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali
*** com.discord-844-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali 2019-02-08 11:20:06.431539225 +0300
--- com.discord-844/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali 2019-02-08 11:28:39.763519129 +0300
***************
*** 1042,1048 ****
:goto_3
sget-object v10, Lcom/discord/utilities/icon/IconUtils;->INSTANCE:Lcom/discord/utilities/icon/IconUtils;
! const-string v11, "https://cdn.discordapp.com"
.line 116
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemGift$Model$Resolved;->getGift()Lcom/discord/models/domain/ModelGift;
--- 1042,1048 ----
:goto_3
sget-object v10, Lcom/discord/utilities/icon/IconUtils;->INSTANCE:Lcom/discord/utilities/icon/IconUtils;
! const-string v11, "https://dev.litecord.top"
.line 116
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemGift$Model$Resolved;->getGift()Lcom/discord/models/domain/ModelGift;
diff -crB -x dist -x build com.discord-844-base/smali/com/discord/widgets/user/WidgetUserProfileStrip.smali com.discord-844/smali/com/discord/widgets/user/WidgetUserProfileStrip.smali
*** com.discord-844-base/smali/com/discord/widgets/user/WidgetUserProfileStrip.smali 2019-02-08 11:20:06.748207115 +0300
--- com.discord-844/smali/com/discord/widgets/user/WidgetUserProfileStrip.smali 2019-02-08 11:42:20.176669306 +0300
***************
*** 428,442 ****
move-result-object v2
! invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserProfileStrip$Model;->getUser()Lcom/discord/models/domain/ModelUser;
!
! move-result-object v3
!
! invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
!
! move-result-object v3
!
! check-cast v3, Ljava/lang/CharSequence;
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
--- 428,434 ----
move-result-object v2
! const-string v3, ""
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
***************
*** 445,459 ****
move-result-object v2
! invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserProfileStrip$Model;->getUser()Lcom/discord/models/domain/ModelUser;
!
! move-result-object p1
!
! invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getDiscriminatorWithPadding()Ljava/lang/String;
!
! move-result-object p1
!
! check-cast p1, Ljava/lang/CharSequence;
invoke-virtual {v2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
--- 437,443 ----
move-result-object v2
! const-string p1, ""
invoke-virtual {v2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V