Port rest of the 8.3.5g patches to 8.3.6g

This commit is contained in:
ave 2019-01-31 10:54:56 +03:00
parent ff452978ca
commit 46dc40f3e5
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
15 changed files with 2574 additions and 0 deletions

View file

@ -2,6 +2,8 @@
This patch enables developer options (empty), mobile experiments (of which there's none) and the secret AMOLED theme (which is shit). This patch enables developer options (empty), mobile experiments (of which there's none) and the secret AMOLED theme (which is shit).
Conflicts with pureevil as it's included here.
#### Bugs / Side effects #### Bugs / Side effects
- Discord banned people for using experiments before. Don't show stuff this publicly. - Discord banned people for using experiments before. Don't show stuff this publicly.

334
patches/litecord/836.patch Normal file
View file

@ -0,0 +1,334 @@
diff -crB -x dist -x build com.discord-834-base/smali/com/discord/app/App.smali com.discord-834/smali/com/discord/app/App.smali
*** com.discord-834-base/smali/com/discord/app/App.smali 2019-01-23 23:17:43.004493819 +0300
--- com.discord-834/smali/com/discord/app/App.smali 2019-01-23 23:27:49.444269345 +0300
***************
*** 218,224 ****
invoke-virtual {v0, v1}, Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;->init(Lkotlin/jvm/functions/Function2;)Lkotlin/Unit;
! const-string v0, "https://cdn.discordapp.com"
.line 75
invoke-static {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->setCdnUri(Ljava/lang/String;)V
--- 218,224 ----
invoke-virtual {v0, v1}, Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;->init(Lkotlin/jvm/functions/Function2;)Lkotlin/Unit;
! const-string v0, "https://dev.litecord.top"
.line 75
invoke-static {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->setCdnUri(Ljava/lang/String;)V
diff -crB -x dist -x build com.discord-834-base/smali/com/discord/BuildConfig.smali com.discord-834/smali/com/discord/BuildConfig.smali
*** com.discord-834-base/smali/com/discord/BuildConfig.smali 2019-01-23 23:17:43.001160471 +0300
--- com.discord-834/smali/com/discord/BuildConfig.smali 2019-01-23 23:27:49.444269345 +0300
***************
*** 16,30 ****
.field public static final FLAVOR_internalExternal:Ljava/lang/String; = "external"
! .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-834-base/smali/com/discord/gateway/GatewaySocket.smali com.discord-834/smali/com/discord/gateway/GatewaySocket.smali
*** com.discord-834-base/smali/com/discord/gateway/GatewaySocket.smali 2019-01-23 23:17:43.041160653 +0300
--- com.discord-834/smali/com/discord/gateway/GatewaySocket.smali 2019-01-23 23:27:49.444269345 +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;
Only in com.discord-834/smali/com/discord/gateway: GatewaySocket.smali.orig
diff -crB -x dist -x build com.discord-834-base/smali/com/discord/stores/StoreGatewayConnection.smali com.discord-834/smali/com/discord/stores/StoreGatewayConnection.smali
*** com.discord-834-base/smali/com/discord/stores/StoreGatewayConnection.smali 2019-01-23 23:17:43.221161471 +0300
--- com.discord-834/smali/com/discord/stores/StoreGatewayConnection.smali 2019-01-23 23:28:19.534418022 +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;
Only in com.discord-834/smali/com/discord/stores: StoreGatewayConnection.smali.orig
diff -crB -x dist -x build com.discord-834-base/smali/com/discord/utilities/icon/IconUtils.smali com.discord-834/smali/com/discord/utilities/icon/IconUtils.smali
*** com.discord-834-base/smali/com/discord/utilities/icon/IconUtils.smali 2019-01-23 23:17:43.417829030 +0300
--- com.discord-834/smali/com/discord/utilities/icon/IconUtils.smali 2019-01-23 23:27:49.450936045 +0300
***************
*** 359,365 ****
goto :goto_2
:cond_1
! const-string p3, "https://cdn.discordapp.com"
.line 103
check-cast p3, Ljava/lang/CharSequence;
--- 359,365 ----
goto :goto_2
:cond_1
! const-string p3, "https://dev.litecord.top"
.line 103
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 135
check-cast p2, Ljava/lang/CharSequence;
--- 649,655 ----
goto :goto_1
:cond_0
! const-string p2, "https://dev.litecord.top"
.line 135
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 82
check-cast p2, Ljava/lang/CharSequence;
--- 900,906 ----
:cond_0
if-eqz p1, :cond_4
! const-string p2, "https://dev.litecord.top"
.line 82
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
***************
*** 1717,1723 ****
.line 176
new-instance v0, Ljava/lang/StringBuilder;
! const-string v1, "https://cdn.discordapp.com/game-assets/"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
--- 1717,1723 ----
.line 176
new-instance v0, Ljava/lang/StringBuilder;
! const-string v1, "https://dev.litecord.top/game-assets/"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
***************
*** 1837,1843 ****
.line 157
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 157
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-834-base/smali/com/discord/utilities/rest/RestAPI$Companion.smali com.discord-834/smali/com/discord/utilities/rest/RestAPI$Companion.smali
*** com.discord-834-base/smali/com/discord/utilities/rest/RestAPI$Companion.smali 2019-01-23 23:17:43.447829167 +0300
--- com.discord-834/smali/com/discord/utilities/rest/RestAPI$Companion.smali 2019-01-23 23:27:49.450936045 +0300
***************
*** 276,282 ****
.line 213
new-instance v0, Lcom/discord/restapi/RestAPIBuilder;
! const-string v9, "https://discordapp.com/api/"
check-cast v6, Lokhttp3/m;
--- 276,282 ----
.line 213
new-instance v0, Lcom/discord/restapi/RestAPIBuilder;
! const-string v9, "https://dev.litecord.top/api/"
check-cast v6, Lokhttp3/m;
diff -crB -x dist -x build com.discord-834-base/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali com.discord-834/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali
*** com.discord-834-base/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali 2019-01-23 23:17:43.477829303 +0300
--- com.discord-834/smali/com/discord/utilities/textprocessing/Rules$createCustomEmojiRule$1$parse$emojiNode$1.smali 2019-01-23 23:27:49.450936045 +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-834-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali com.discord-834/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali
*** com.discord-834-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali 2019-01-23 23:17:43.607829894 +0300
--- com.discord-834/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGameInvite.smali 2019-01-23 23:27:49.450936045 +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-834-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali com.discord-834/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali
*** com.discord-834-base/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali 2019-01-23 23:17:43.614496591 +0300
--- com.discord-834/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemGift.smali 2019-01-23 23:27:49.450936045 +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;

View file

@ -6,6 +6,8 @@ Just replace all mentions of `dev.litecord.top` to your instance.
Please keep in mind that litecord is free (gratis and libre) software, provided under a libre license. If you paid money for it, you got scammed. Please keep in mind that litecord is free (gratis and libre) software, provided under a libre license. If you paid money for it, you got scammed.
Conflicts with nozlib as it's included here.
#### Bugs / Side effects #### Bugs / Side effects
- Gateway stuff is fucked and `Connecting...` is always visible. - Gateway stuff is fucked and `Connecting...` is always visible.
@ -14,4 +16,5 @@ Please keep in mind that litecord is free (gratis and libre) software, provided
- 8.3.3 - 8.3.3
- 8.3.4g - 8.3.4g
- 8.3.5g - 8.3.5g
- 8.3.6g

1907
patches/mutant/836.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,7 @@ Various scripts are provided to help building of custom patches easier.
- 8.3.3 - 8.3.3
- 8.3.4g - 8.3.4g
- 8.3.5g - 8.3.5g
- 8.3.6g
#### Disclaimer #### Disclaimer

View file

@ -0,0 +1,18 @@
diff -crB -x dist -x build com.discord-835-base/res/layout/widget_chat_list_adapter_item_blocked.xml com.discord-835/res/layout/widget_chat_list_adapter_item_blocked.xml
*** com.discord-835-base/res/layout/widget_chat_list_adapter_item_blocked.xml 2019-01-25 10:57:34.359248256 +0300
--- com.discord-835/res/layout/widget_chat_list_adapter_item_blocked.xml 2019-01-27 00:08:22.929085528 +0300
***************
*** 1,5 ****
<?xml version="1.0" encoding="utf-8"?>
! <RelativeLayout android:background="?selectableItemBackground" android:paddingLeft="@dimen/chat_cell_horizontal_spacing_padding" android:paddingTop="@dimen/chat_cell_vertical_spacing_padding" android:paddingRight="@dimen/chat_cell_horizontal_spacing_padding" android:paddingBottom="@dimen/chat_cell_vertical_spacing_padding" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/chat_cell_horizontal_spacing_margin" android:layout_marginRight="@dimen/chat_cell_horizontal_spacing_margin"
xmlns:android="http://schemas.android.com/apk/res/android">
! <TextView android:textSize="11.0sp" android:textColor="?theme_chat_blocked_text" android:gravity="center" android:id="@id/chat_list_adapter_item_blocked" android:background="?theme_chat_blocked_bg" android:paddingTop="7.5dip" android:paddingBottom="7.5dip" android:layout_width="fill_parent" style="@style/UiKit.TextView" />
</RelativeLayout>
\ No newline at end of file
--- 1,5 ----
<?xml version="1.0" encoding="utf-8"?>
! <RelativeLayout android:background="?selectableItemBackground" android:paddingLeft="0px" android:paddingTop="0px" android:paddingRight="0px" android:paddingBottom="@dimen/chat_cell_vertical_spacing_padding" android:layout_width="0px" android:layout_height="0px" android:layout_marginLeft="0px" android:layout_marginRight="@dimen/chat_cell_horizontal_spacing_margin"
xmlns:android="http://schemas.android.com/apk/res/android">
! <TextView android:textSize="0sp" android:textColor="?theme_chat_blocked_text" android:gravity="center" android:id="@id/chat_list_adapter_item_blocked" android:background="?theme_chat_blocked_bg" android:paddingTop="0dip" android:paddingBottom="0dip" android:layout_width="fill_parent" style="@style/UiKit.TextView" />
</RelativeLayout>
\ No newline at end of file

View file

@ -4,4 +4,5 @@ This patch completely hides the "# Blocked Message(s)" thing.
#### Available and tested on: #### Available and tested on:
- 8.3.5g - 8.3.5g
- 8.3.6g

View file

@ -0,0 +1,87 @@
diff -crB -x dist -x build com.discord-833-base/smali/com/discord/widgets/friends/NearbyManager.smali com.discord-833/smali/com/discord/widgets/friends/NearbyManager.smali
*** com.discord-833-base/smali/com/discord/widgets/friends/NearbyManager.smali 2019-01-23 11:03:47.459035497 +0300
--- com.discord-833/smali/com/discord/widgets/friends/NearbyManager.smali 2019-01-23 11:23:00.200709501 +0300
***************
*** 440,512 ****
# virtual methods
.method public final activateNearby()V
! .locals 9
!
! .line 58
! iget-object v0, p0, Lcom/discord/widgets/friends/NearbyManager;->messagesClient:Lcom/google/android/gms/nearby/messages/MessagesClient;
!
! if-nez v0, :cond_0
!
! return-void
!
! .line 59
! :cond_0
! iget-object v1, p0, Lcom/discord/widgets/friends/NearbyManager;->outboundMessage:Lcom/google/android/gms/nearby/messages/Message;
!
! if-nez v1, :cond_1
!
! return-void
!
! .line 60
! :cond_1
! iget-object v2, p0, Lcom/discord/widgets/friends/NearbyManager;->messagePublishOptions:Lcom/google/android/gms/nearby/messages/PublishOptions;
!
! if-nez v2, :cond_2
!
! return-void
!
! .line 61
! :cond_2
! iget-object v3, p0, Lcom/discord/widgets/friends/NearbyManager;->messageListener:Lcom/google/android/gms/nearby/messages/MessageListener;
!
! if-nez v3, :cond_3
!
! return-void
!
! .line 62
! :cond_3
! iget-object v4, p0, Lcom/discord/widgets/friends/NearbyManager;->subscribeOptions:Lcom/google/android/gms/nearby/messages/SubscribeOptions;
!
! if-nez v4, :cond_4
!
! return-void
!
! .line 64
! :cond_4
! iget-object v5, p0, Lcom/discord/widgets/friends/NearbyManager;->nearbyStateSubject:Lrx/subjects/BehaviorSubject;
!
! new-instance v6, Lcom/discord/widgets/friends/NearbyManager$NearbyState$Connected;
!
! new-instance v7, Ljava/util/HashSet;
!
! iget-object v8, p0, Lcom/discord/widgets/friends/NearbyManager;->nearbyUserIds:Ljava/util/HashSet;
!
! check-cast v8, Ljava/util/Collection;
!
! invoke-direct {v7, v8}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
!
! check-cast v7, Ljava/util/Set;
!
! invoke-direct {v6, v7}, Lcom/discord/widgets/friends/NearbyManager$NearbyState$Connected;-><init>(Ljava/util/Set;)V
!
! invoke-virtual {v5, v6}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
!
! .line 66
! invoke-virtual {v0, v1, v2}, Lcom/google/android/gms/nearby/messages/MessagesClient;->a(Lcom/google/android/gms/nearby/messages/Message;Lcom/google/android/gms/nearby/messages/PublishOptions;)Lcom/google/android/gms/tasks/g;
!
! .line 67
! invoke-virtual {v0, v3, v4}, Lcom/google/android/gms/nearby/messages/MessagesClient;->a(Lcom/google/android/gms/nearby/messages/MessageListener;Lcom/google/android/gms/nearby/messages/SubscribeOptions;)Lcom/google/android/gms/tasks/g;
!
return-void
.end method
--- 440,446 ----
# virtual methods
.method public final activateNearby()V
! .locals 0
return-void
.end method

View file

@ -7,4 +7,5 @@ This patch nulls a bunch of nearby friends features for privacy.
- 8.3.3 - 8.3.3
- 8.3.4g - 8.3.4g
- 8.3.5g - 8.3.5g
- 8.3.6g

View file

@ -2,6 +2,9 @@
This patch disables zlib-stream field on wss, making it easier to parse it. This patch disables zlib-stream field on wss, making it easier to parse it.
Conflicts with litecord patch.
#### Available and tested on: #### Available and tested on:
- 8.3.5g - 8.3.5g
- 8.3.6g

View file

@ -2,6 +2,8 @@
This patch enables the secret AMOLED theme (which is shit). This patch enables the secret AMOLED theme (which is shit).
Conflicts with experiments.
#### Bugs / Side effects #### Bugs / Side effects
- Discord banned people for using experiments before, which is why this patch exists. It doesn't enable everything developer related, just AMOLED theme. Still, don't show stuff this publicly. - Discord banned people for using experiments before, which is why this patch exists. It doesn't enable everything developer related, just AMOLED theme. Still, don't show stuff this publicly.
@ -10,4 +12,5 @@ This patch enables the secret AMOLED theme (which is shit).
- 8.3.3 - 8.3.3
- 8.3.4g - 8.3.4g
- 8.3.5g - 8.3.5g
- 8.3.6g

191
patches/smalltime/836.patch Normal file
View file

@ -0,0 +1,191 @@
diff -crB -x dist -x build com.discord-836-testing/smali_classes2/com/miguelgaeta/simple_time/SimpleTime.smali com.discord-836/smali_classes2/com/miguelgaeta/simple_time/SimpleTime.smali
*** com.discord-836-testing/smali_classes2/com/miguelgaeta/simple_time/SimpleTime.smali 2019-01-31 10:40:04.989283867 +0300
--- com.discord-836/smali_classes2/com/miguelgaeta/simple_time/SimpleTime.smali 2019-01-31 10:53:44.476028781 +0300
***************
*** 247,419 ****
.end method
.method public toReadableTimeString(Ljava/lang/Long;)Ljava/lang/String;
! .locals 6
!
! .line 126
! invoke-virtual {p0}, Lcom/miguelgaeta/simple_time/SimpleTime;->currentTimeMillis()J
!
! move-result-wide v0
!
! invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
!
! move-result-object v0
!
! invoke-virtual {p0, v0}, Lcom/miguelgaeta/simple_time/SimpleTime;->toCalendar(Ljava/lang/Long;)Ljava/util/Calendar;
!
! move-result-object v0
!
! const/4 v1, 0x0
!
! const/16 v2, 0xb
!
! .line 128
! invoke-virtual {v0, v2, v1}, Ljava/util/Calendar;->set(II)V
!
! const/16 v2, 0xc
!
! .line 129
! invoke-virtual {v0, v2, v1}, Ljava/util/Calendar;->set(II)V
!
! const/16 v2, 0xd
!
! .line 130
! invoke-virtual {v0, v2, v1}, Ljava/util/Calendar;->set(II)V
!
! const/16 v2, 0xe
!
! .line 131
! invoke-virtual {v0, v2, v1}, Ljava/util/Calendar;->set(II)V
!
! .line 133
! iget-object v1, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->locale:Ljava/util/Locale;
!
! invoke-virtual {v1}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
!
! move-result-object v1
!
! const-string v2, "en"
!
! invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
!
! move-result v1
!
! if-nez v1, :cond_1
!
! .line 136
! invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
!
! move-result-wide v1
!
! invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J
!
! move-result-wide v3
!
! cmp-long v0, v1, v3
!
! if-lez v0, :cond_0
!
! .line 137
iget-object v0, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterTime:Ljava/text/DateFormat;
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
- move-result-object p1
-
- return-object p1
-
- .line 139
- :cond_0
- iget-object v0, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterDateTime:Ljava/text/DateFormat;
-
- invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
-
- move-result-object p1
-
- return-object p1
-
- .line 143
- :cond_1
- invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
-
- move-result-wide v1
-
- invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J
-
- move-result-wide v3
-
- cmp-long v5, v1, v3
-
- if-lez v5, :cond_2
-
- .line 144
- new-instance v0, Ljava/lang/StringBuilder;
-
- const-string v1, "Today at "
-
- invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
-
- iget-object v1, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterTime:Ljava/text/DateFormat;
-
- invoke-virtual {v1, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
-
- move-result-object p1
-
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
-
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
-
- move-result-object p1
-
- return-object p1
-
- :cond_2
- const/4 v1, 0x5
-
- const/4 v2, -0x1
-
- .line 147
- invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->add(II)V
-
- .line 149
- invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
-
- move-result-wide v1
-
- invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J
-
- move-result-wide v3
-
- cmp-long v0, v1, v3
-
- if-lez v0, :cond_3
-
- .line 150
- new-instance v0, Ljava/lang/StringBuilder;
-
- const-string v1, "Yesterday at "
-
- invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
-
- iget-object v1, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterTime:Ljava/text/DateFormat;
-
- invoke-virtual {v1, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
-
- move-result-object p1
-
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
-
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
-
- move-result-object p1
-
- return-object p1
-
- .line 153
- :cond_3
- iget-object v0, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterDateTime:Ljava/text/DateFormat;
-
- invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
-
move-result-object p1
return-object p1
--- 247,257 ----
.end method
.method public toReadableTimeString(Ljava/lang/Long;)Ljava/lang/String;
! .locals 1
iget-object v0, p0, Lcom/miguelgaeta/simple_time/SimpleTime;->formatterTime:Ljava/text/DateFormat;
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
return-object p1

View file

@ -4,4 +4,5 @@ This patch replaces the long time string with just a simple time string. This is
#### Available and tested on: #### Available and tested on:
- 8.3.5g - 8.3.5g
- 8.3.6g

View file

@ -0,0 +1,21 @@
*** com.discord-835-base/res/values/styles.xml 2019-01-25 10:57:34.429248557 +0300
--- com.discord-835/res/values/styles.xml 2019-01-28 16:51:28.771000850 +0300
***************
*** 809,815 ****
<item name="actualImageScaleType">fitCenter</item>
<item name="placeholderImage">@drawable/asset_default_avatar_32dp</item>
<item name="placeholderImageScaleType">fitCenter</item>
! <item name="roundAsCircle">true</item>
</style>
<style name="Avatar.Chat" parent="@style/Avatar.Large">
<item name="android:layout_width">@dimen/avatar_size_chat</item>
--- 809,816 ----
<item name="actualImageScaleType">fitCenter</item>
<item name="placeholderImage">@drawable/asset_default_avatar_32dp</item>
<item name="placeholderImageScaleType">fitCenter</item>
! <item name="roundAsCircle">false</item>
! <item name="roundedCornerRadius">3dp</item>
</style>
<style name="Avatar.Chat" parent="@style/Avatar.Large">
<item name="android:layout_width">@dimen/avatar_size_chat</item>

View file

@ -6,4 +6,5 @@ A very small amount of rounding is applied to make it look a little better.
#### Available and tested on: #### Available and tested on:
- 8.3.5g - 8.3.5g
- 8.3.6g