Update ServerFolders.plugin.js

This commit is contained in:
Mirco Wittrien 2019-01-04 19:51:22 +01:00
parent a7beef8b19
commit 850242a10f
1 changed files with 3 additions and 6 deletions

View File

@ -371,12 +371,6 @@ class ServerFolders {
this.DiscordConstants = BDFDB.WebModules.findByProperties("Permissions", "ActivityTypes", "StatusTypes");
this.Animations = BDFDB.WebModules.findByProperties("spring");
$(BDFDB.dotCN.guilds).on("click." + this.getName(), "div" + BDFDB.dotCN.guildseparator + ":not(.folderseparator) ~ div" + BDFDB.dotCN.guild + ":not(.folder)", () => {
if (BDFDB.getData("closeAllFolders", this, "settings")) {
document.querySelectorAll(".folder.open").forEach(openFolder => {this.openCloseFolder(openFolder);});
}
});
let folders = BDFDB.loadAllData(this, "folders"), sortedFolders = [];
for (let id in folders) sortedFolders[folders[id].position] = folders[id];
for (let data of sortedFolders) if (data && !document.querySelector(BDFDB.dotCN.guild + ".folder#" + data.folderID)) {
@ -491,6 +485,9 @@ class ServerFolders {
}
$(wrapper)
.off("." + this.getName())
.on("click." + this.getName(), () => {
if (BDFDB.getData("closeAllFolders", this, "settings")) document.querySelectorAll(".folder.open").forEach(openFolder => {this.openCloseFolder(openFolder);});
})
.on("mousedown." + this.getName(), (e) => {
if (BDFDB.pressedKeys.includes(17)) {
e.stopPropagation();