mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 10:27:03 -04:00
Pr Stuff
Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
parent
8c2bfea5c0
commit
4f72832ba1
7 changed files with 50 additions and 7 deletions
|
@ -81,9 +81,14 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
calculateNameColorForMessageContext(context: any) {
|
||||
const id = context?.message?.author?.id;
|
||||
const userId: string | undefined = context?.message?.author?.id;
|
||||
const colorString = context?.author?.colorString;
|
||||
const color = calculateNameColorForUser(id);
|
||||
const color = calculateNameColorForUser(userId);
|
||||
|
||||
// color preview in role settings
|
||||
// channel.id is undefined in the role menu
|
||||
if (context?.message?.channel_id === "1337" && userId === "313337")
|
||||
return colorString;
|
||||
|
||||
if (settings.store.applyColorOnlyInDms && !context?.channel?.isPrivate()) {
|
||||
return colorString;
|
||||
|
|
|
@ -136,7 +136,7 @@ export default definePlugin({
|
|||
// @ts-expect-error
|
||||
if (data.sinkId != null && data.sinkId !== data.audioContext.sinkId && "setSinkId" in AudioContext.prototype) {
|
||||
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId
|
||||
data.audioContext.setSinkId(data.sinkId);
|
||||
data.audioContext.setSinkId(data.sinkId === "default" ? "" : data.sinkId);
|
||||
}
|
||||
|
||||
data.gainNode.gain.value = data._mute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue