From 39936489cdf648a5e00e985a4ecf0bddeba169e3 Mon Sep 17 00:00:00 2001 From: Ave Date: Thu, 30 Jul 2020 01:27:37 +0300 Subject: [PATCH] betterdmheader: Implement betterdmheader Closes #73 --- patches/README.md | 1 + patches/betterdmheader/1208.patch | 68 +++++++++++++++++++++++++++++++ patches/betterdmheader/README.md | 9 ++++ 3 files changed, 78 insertions(+) create mode 100644 patches/betterdmheader/1208.patch create mode 100644 patches/betterdmheader/README.md diff --git a/patches/README.md b/patches/README.md index 8d726b2..192996e 100644 --- a/patches/README.md +++ b/patches/README.md @@ -6,6 +6,7 @@ The patches with **bold** names are the ones I'm most proud of. --- +- betterdmheader: Replaces call button on dm header with a search button. - **bettertm**: Replaces the :tm: and :registered: emojis with rendered unicode variants, making them look much better. Before bettertm: diff --git a/patches/betterdmheader/1208.patch b/patches/betterdmheader/1208.patch new file mode 100644 index 0000000..ff4d3ce --- /dev/null +++ b/patches/betterdmheader/1208.patch @@ -0,0 +1,68 @@ +Only in com.discord: build +Only in com.discord: dist +diff --color -crB com.discord-base/res/menu/menu_chat_toolbar.xml com.discord/res/menu/menu_chat_toolbar.xml +*** com.discord-base/res/menu/menu_chat_toolbar.xml 2020-07-29 21:27:23.586754395 +0300 +--- com.discord/res/menu/menu_chat_toolbar.xml 2020-07-30 01:15:42.119285954 +0300 +*************** +*** 1,10 **** + + +! + + + +! + + +\ No newline at end of file +--- 1,10 ---- + + +! + + + +! + + +\ No newline at end of file +diff --color -crB com.discord-base/smali/com/discord/widgets/home/WidgetHomeHeaderManager$getOnConfigureAction$1.smali com.discord/smali/com/discord/widgets/home/WidgetHomeHeaderManager$getOnConfigureAction$1.smali +*** com.discord-base/smali/com/discord/widgets/home/WidgetHomeHeaderManager$getOnConfigureAction$1.smali 2020-07-29 21:27:28.896785061 +0300 +--- com.discord/smali/com/discord/widgets/home/WidgetHomeHeaderManager$getOnConfigureAction$1.smali 2020-07-30 01:22:28.321730038 +0300 +*************** +*** 119,125 **** + + invoke-static {v3, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + +! invoke-interface {v3, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem; + + .line 5 + invoke-interface {p1, v7}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem; +--- 119,125 ---- + + invoke-static {v3, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + +! invoke-interface {v3, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem; + + .line 5 + invoke-interface {p1, v7}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem; +*************** +*** 140,146 **** + + invoke-static {v3, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + +! invoke-interface {v3, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem; + + .line 7 + invoke-interface {p1, v7}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem; +--- 140,146 ---- + + invoke-static {v3, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + +! invoke-interface {v3, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem; + + .line 7 + invoke-interface {p1, v7}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem; + diff --git a/patches/betterdmheader/README.md b/patches/betterdmheader/README.md new file mode 100644 index 0000000..8390049 --- /dev/null +++ b/patches/betterdmheader/README.md @@ -0,0 +1,9 @@ +## DisTok CutTheCord: Better DM Header Patch + +This patch replaces the call button on DM headers with search button. The call button is still available in the right menu. + +![](https://lasagna.cat/i/9njfeecd.png) + +#### Available and tested on: +- 33.1 +