Update editor, workspace, Git services, appearance, and project guides
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export class SnapshotOrder {
|
||||
private runtimeId = '';
|
||||
private revision = -1;
|
||||
private retired = new Set<string>();
|
||||
|
||||
accept(value: { runtimeId?: string; revision?: number }): boolean {
|
||||
if (!value.runtimeId || !Number.isSafeInteger(value.revision)) return true;
|
||||
if (this.retired.has(value.runtimeId)) return false;
|
||||
if (value.runtimeId !== this.runtimeId) {
|
||||
if (this.runtimeId) this.retired.add(this.runtimeId);
|
||||
this.runtimeId = value.runtimeId;
|
||||
this.revision = -1;
|
||||
}
|
||||
if (value.revision! <= this.revision) return false;
|
||||
this.revision = value.revision!;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user