Update NotificationSounds.plugin.js

This commit is contained in:
Mirco Wittrien 2021-02-04 15:24:56 +01:00
parent e15e5ec361
commit 790bf5fc7c
1 changed files with 2 additions and 20 deletions

View File

@ -14,7 +14,7 @@ module.exports = (_ => {
"info": {
"name": "NotificationSounds",
"author": "DevilBro",
"version": "3.5.8",
"version": "3.5.9",
"description": "Allow you to replace the native sounds of Discord with your own"
},
"changeLog": {
@ -199,12 +199,6 @@ module.exports = (_ => {
}
};
this.patchedModules = {
after: {
Shakeable: "render"
}
};
this.patchPriority = 10;
}
@ -644,19 +638,7 @@ module.exports = (_ => {
createdAudios["call_calling"] = BDFDB.LibraryModules.SoundUtils.createSound("call_calling");
volumes = BDFDB.DataUtils.get(this, "volumes");
BDFDB.PatchUtils.forceAllUpdates(this);
}
processShakeable (e) {
if (repatchIncoming && e.returnvalue && BDFDB.ArrayUtils.is(e.returnvalue.props.children)) {
let index = e.returnvalue.props.children.findIndex(n => {
let string = n && n.type && n.type.toString();
return string && string.indexOf("call_ringing_beat") > -1 && string.indexOf("call_ringing") > -1 && string.indexOf("hasIncomingCalls") > -1;
});
if (index > -1) {
repatchIncoming = false;
e.returnvalue.props.children[index] = BDFDB.ReactUtils.createElement(e.returnvalue.props.children[index].type, e.returnvalue.props.children[index].props);
}
}
BDFDB.DiscordUtils.rerenderAll();
}
loadAudios () {