This commit is contained in:
Mirco Wittrien 2019-10-22 20:23:43 +02:00
parent 59e61334a5
commit b86993ddb3
3 changed files with 4 additions and 4 deletions

View File

@ -350,7 +350,7 @@ class FriendNotifications {
let id = avatar.getAttribute("user-id");
let group = avatar.getAttribute("group");
if (id && group) {
let data = BDFDB.DataUtils.load(this, group) || this.createDefaultConfig(, id);
let data = BDFDB.DataUtils.load(this, group, id) || this.createDefaultConfig();
data.desktop = desktopon;
data.disabled = disableon;
BDFDB.toggleClass(avatar, "desktop", desktopon);
@ -382,7 +382,7 @@ class FriendNotifications {
let config = checkbox.getAttribute("config");
let group = checkbox.getAttribute("group");
if (id && config && group) {
let data = BDFDB.DataUtils.load(this, group) || this.createDefaultConfig(, id);
let data = BDFDB.DataUtils.load(this, group, id) || this.createDefaultConfig();
data[config] = checkbox.checked;
BDFDB.DataUtils.save(data, this, group, id);
this.SettingsUpdated = true;

View File

@ -260,7 +260,7 @@ class RepoControls {
else BDFDB.NotificationUtils.toast(`Successfully deleted ${type} "${name}".`, {type:"success"});
});
};
if (!BDFDB.DataUtils.get(this, "settings")) deleteFile(, "confirmDelete");
if (!BDFDB.DataUtils.get(this, "settings", "confirmDelete")) deleteFile();
else BDFDB.openConfirmModal(this, `Are you sure you want to delete the ${type} "${name}"?`, () => {
deleteFile();
});

View File

@ -442,7 +442,7 @@ class ServerFolders {
}
if (state.expanded) setImmediate(() => {
for (let guildid of instance.props.guildIds) this.updateGuildInFolderContent(state.folderId, guildid);
if (this.clickedFolder == state.folderId && BDFDB.DataUtils.get(this, "settings")) for (let openFolderId of BDFDB.LibraryModules.FolderUtils.getExpandedFolders(, "closeOtherFolders")) if (openFolderId != state.folderId) {
if (this.clickedFolder == state.folderId && BDFDB.DataUtils.get(this, "settings", "closeOtherFolders")) for (let openFolderId of BDFDB.LibraryModules.FolderUtils.getExpandedFolders()) if (openFolderId != state.folderId) {
BDFDB.removeEles(this.foldercontent.querySelectorAll(`${BDFDB.dotCN.guildouter}[folderid="${openFolderId}"]`));
BDFDB.LibraryModules.GuildUtils.toggleGuildFolderExpand(openFolderId);
}