set ignore

This commit is contained in:
tamaina 2023-08-11 14:59:54 +00:00
parent fe41335d1a
commit c5f2ced66c
1 changed files with 8 additions and 0 deletions

View File

@ -107,6 +107,14 @@ export class NoteManager {
}
public set(_note: Note): void {
if (this.updatedAt.has(_note.id) && this.notesSource.value.has(_note.id)) {
if (this.updatedAt.get(_note.id)! + 100 > Date.now()) {
if (this.isDebuggerEnabled) console.log('NoteManager: set ignore', _note.id);
// 100ms以内に更新されたートは無視
return;
}
}
const note: Note = { ..._note };
userLiteManager.set(note.user);