mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-29 14:57:05 +00:00
test: recover review harness controller contract
This commit is contained in:
@@ -27,6 +27,7 @@ export interface CompatibilityReviewUi {
|
||||
export class CompatibilityReviewController {
|
||||
private pause: CompatibilityPause | undefined;
|
||||
private activeReview: Promise<void> | undefined;
|
||||
private _initialised = false;
|
||||
private disposed = false;
|
||||
|
||||
constructor(
|
||||
@@ -39,6 +40,10 @@ export class CompatibilityReviewController {
|
||||
return this.pause;
|
||||
}
|
||||
|
||||
get initialised(): boolean {
|
||||
return this._initialised;
|
||||
}
|
||||
|
||||
private readAcknowledgedVersion(): string | null {
|
||||
const setting = this.core.services.setting;
|
||||
const currentMarker = setting.getSmallConfig(DATABASE_COMPATIBILITY_VERSION_KEY);
|
||||
@@ -68,14 +73,19 @@ export class CompatibilityReviewController {
|
||||
this.pause = evaluation.pause;
|
||||
if (evaluation.initialiseAcknowledgedVersion) {
|
||||
setting.setSmallConfig(DATABASE_COMPATIBILITY_VERSION_KEY, `${this.currentVersion}`);
|
||||
this._initialised = true;
|
||||
return true;
|
||||
}
|
||||
if (!this.pause) {
|
||||
this._initialised = true;
|
||||
return true;
|
||||
}
|
||||
if (!this.pause) return true;
|
||||
|
||||
if (settings.versionUpFlash === "") {
|
||||
settings.versionUpFlash = COMPATIBILITY_PAUSE_SETTING_MESSAGE;
|
||||
await setting.saveSettingData();
|
||||
}
|
||||
this._initialised = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user