RoleColorEverywhere: only colour sent messages (ignore pending/failed) (#3895)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
98a38642c7
commit
58815b642e
1 changed files with 3 additions and 0 deletions
|
|
@ -192,6 +192,9 @@ export default definePlugin({
|
|||
const { messageSaturation } = settings.use(["messageSaturation"]);
|
||||
const author = useMessageAuthor(message);
|
||||
|
||||
// Do not apply role color if the send fails, otherwise it becomes indistinguishable if the message is sent
|
||||
if (message.state !== "SENT") return;
|
||||
|
||||
if (author.colorString != null && messageSaturation !== 0) {
|
||||
const value = `color-mix(in oklab, ${author.colorString} ${messageSaturation}%, var({DEFAULT}))`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue