Merge branch 'dev' into immediate-finds

This commit is contained in:
Nuckyz 2024-05-15 23:40:23 -03:00
commit 569dace244
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -115,8 +115,9 @@ export default definePlugin({
// Can't do anything if the clock is behind
const abs = Math.abs(delta);
const ahead = abs !== delta;
const latencyMillis = latency * 1000;
const stringDelta = abs >= latency * 1000 ? this.stringDelta(abs, showMillis) : null;
const stringDelta = abs >= latencyMillis ? this.stringDelta(abs, showMillis) : null;
// Also thanks dziurwa
// 2 minutes
@ -126,11 +127,11 @@ export default definePlugin({
? ["status-positive", "status-positive", "text-muted"]
: delta >= TROLL_LIMIT || ahead
? ["text-muted", "text-muted", "text-muted"]
: delta >= (latency * 2000)
: delta >= (latencyMillis * 2)
? ["status-danger", "text-muted", "text-muted"]
: ["status-warning", "status-warning", "text-muted"];
return (abs >= latency || isDiscordKotlin) ? { delta: stringDelta, ahead, fill, isDiscordKotlin } : null;
return (abs >= latencyMillis || isDiscordKotlin) ? { delta: stringDelta, ahead, fill, isDiscordKotlin } : null;
},
Tooltip() {