Compare commits

...

2 Commits

Author SHA1 Message Date
chylex
8f7b566db7
Release v34 (app) 2022-03-20 13:40:31 +01:00
chylex
70a2a01ec3
Fix switching to next channel in DMs after a recent Discord update 2022-03-20 13:40:31 +01:00
2 changed files with 12 additions and 7 deletions

View File

@ -232,16 +232,21 @@ class DISCORD {
if (dms) {
const currentChannel = DOM.queryReactClass("selected", dms);
const nextChannel = currentChannel && currentChannel.nextElementSibling;
const currentChannelContainer = currentChannel && currentChannel.closest("[class*='channel-']");
const nextChannel = currentChannelContainer && currentChannelContainer.nextElementSibling;
if (!nextChannel || !nextChannel.getAttribute("class").includes("channel-") || !("href" in nextChannel) || !nextChannel.href.includes("/@me/")) {
if (!nextChannel || !nextChannel.getAttribute("class").includes("channel-")) {
return false;
}
else {
nextChannel.click();
nextChannel.scrollIntoView(true);
return true;
const nextChannelLink = nextChannel.querySelector("a[href*='/@me/']");
if (!nextChannelLink) {
return false;
}
nextChannelLink.click();
nextChannelLink.scrollIntoView(true);
return true;
}
else {
const channelListEle = document.getElementById("channels");

View File

@ -7,6 +7,6 @@ using DHT.Utils;
namespace DHT.Utils {
static class Version {
public const string Tag = "32.2.0.0";
public const string Tag = "34.0.0.0";
}
}