put nohiddenchannels in old-patches and add a readme

This commit is contained in:
ave 2019-05-26 22:43:24 +03:00
parent 704828f405
commit 18967425df
No known key found for this signature in database
GPG Key ID: 09356ABAA42C842B
3 changed files with 67 additions and 0 deletions

7
old-patches/README.md Normal file
View File

@ -0,0 +1,7 @@
## CutTheCord: Old Patches
This folder contains old patches.
Here's why these patches are no longer maintained in this form:
- nohiddenchannels: Moved into slashcommands as a slash command
- notyping: Moved into slashcommands as a slash command

View File

@ -0,0 +1,49 @@
diff -crB com.discord-903-base/smali/com/discord/models/domain/ModelChannel.smali com.discord-903/smali/com/discord/models/domain/ModelChannel.smali
*** com.discord-903-base/smali/com/discord/models/domain/ModelChannel.smali 2019-05-24 23:40:49.520802264 +0300
--- com.discord-903/smali/com/discord/models/domain/ModelChannel.smali 2019-05-25 02:48:42.334585852 +0300
***************
*** 431,437 ****
.end method
.method private computeName()Ljava/lang/String;
! .locals 1
.line 272
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
--- 431,437 ----
.end method
.method private computeName()Ljava/lang/String;
! .locals 2
.line 272
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
***************
*** 2083,2095 ****
.end annotation
.line 246
! iget-object v0, p0, Lcom/discord/models/domain/ModelChannel;->permissionOverwrites:Ljava/util/Map;
! if-eqz v0, :cond_0
! return-object v0
! :cond_0
sget-object v0, Lcom/discord/models/domain/ModelChannel;->EMPTY_PERMISSION_OVERWRITES:Ljava/util/Map;
return-object v0
--- 2083,2095 ----
.end annotation
.line 246
! #iget-object v0, p0, Lcom/discord/models/domain/ModelChannel;->permissionOverwrites:Ljava/util/Map;
! #if-eqz v0, :cond_0
! #return-object v0
! #:cond_0
sget-object v0, Lcom/discord/models/domain/ModelChannel;->EMPTY_PERMISSION_OVERWRITES:Ljava/util/Map;
return-object v0

View File

@ -0,0 +1,11 @@
## DisTok CutTheCord: No Hidden Channels Patch
This patch shows all channels in the channel list, even those you lack permissions to view.
#### Side effects / bugs
- May break channel edits/creates, not sure
- Currently no indicator is given if you can view a channel or not, I plan to prepend their name with smth later
- Currently you can't turn this on or off, I'll also change that eventually
#### Available and tested on:
- 9.0.3