mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
Fixes For CustomUserColors
This commit is contained in:
parent
e941ba88c0
commit
7cd521cb0e
2 changed files with 34 additions and 39 deletions
|
@ -96,19 +96,13 @@ export default definePlugin({
|
|||
const color = calculateNameColorForUser(userId);
|
||||
const customColor = userId && Settings.plugins.CustomUserColors.enabled ? getCustomColorString(userId, true) : null;
|
||||
|
||||
// Color preview in role settings
|
||||
if (context?.message?.channel_id === "1337" && userId === "313337")
|
||||
return customColor ?? colorString;
|
||||
if (
|
||||
(context?.message?.channel_id === "1337" && userId === "313337") ||
|
||||
(settings.store.applyColorOnlyInDms && !context?.channel?.isPrivate()) ||
|
||||
(settings.store.applyColorOnlyToUsersWithoutColor && colorString)
|
||||
) return customColor ?? colorString;
|
||||
|
||||
if (settings.store.applyColorOnlyInDms && !context?.channel?.isPrivate()) {
|
||||
return customColor ?? colorString;
|
||||
}
|
||||
|
||||
if (!settings.store.applyColorOnlyToUsersWithoutColor || !colorString) {
|
||||
return customColor ?? color;
|
||||
} else {
|
||||
return customColor ?? colorString;
|
||||
}
|
||||
return customColor ?? color;
|
||||
},
|
||||
|
||||
calculateNameColorForListContext(context: any) {
|
||||
|
@ -117,14 +111,11 @@ export default definePlugin({
|
|||
const color = calculateNameColorForUser(id);
|
||||
const customColor = id && Settings.plugins.CustomUserColors.enabled ? getCustomColorString(id, true) : null;
|
||||
|
||||
if (settings.store.applyColorOnlyInDms && !context?.channel?.isPrivate()) {
|
||||
return customColor ?? colorString;
|
||||
}
|
||||
if (
|
||||
(settings.store.applyColorOnlyInDms && !context?.channel?.isPrivate()) ||
|
||||
(settings.store.applyColorOnlyToUsersWithoutColor && colorString)
|
||||
) return customColor ?? colorString;
|
||||
|
||||
if (!settings.store.applyColorOnlyToUsersWithoutColor || !colorString) {
|
||||
return customColor ?? color;
|
||||
} else {
|
||||
return customColor ?? colorString;
|
||||
}
|
||||
return customColor ?? color;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue