Streaks: do a clientside update for people without the plugin
This commit is contained in:
parent
424c91d438
commit
3a4552843e
1 changed files with 8 additions and 2 deletions
|
|
@ -103,8 +103,14 @@ export default definePlugin({
|
|||
}
|
||||
} else if (message.author.id === recipientId) {
|
||||
if (!theirFlag) {
|
||||
setTimeout(() => {
|
||||
useStreaksStore.getState().refresh(recipientId);
|
||||
setTimeout(async () => {
|
||||
const before = useStreaksStore.getState().streaks[recipientId]?.count;
|
||||
await useStreaksStore.getState().refresh(recipientId);
|
||||
const after = useStreaksStore.getState().streaks[recipientId]?.count;
|
||||
|
||||
if (before === after) {
|
||||
useStreaksStore.getState().update(recipientId);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue