Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions frontend/src/ts/test/test-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ export function restart(options = {} as RestartOptions): void {

let lastInitError: Error | null = null;
let rememberLazyMode: boolean;
let showedLazyModeNotification: boolean = false;
let testReinitCount = 0;

async function init(): Promise<boolean> {
Expand Down Expand Up @@ -501,18 +502,20 @@ async function init(): Promise<boolean> {
important: true,
},
);
UpdateConfig.setLazyMode(false, true);
UpdateConfig.setLazyMode(false, false);
} else if (rememberLazyMode && anySupportsLazyMode) {
UpdateConfig.setLazyMode(true, true);
}
} else {
// normal mode
if (Config.lazyMode && !allowLazyMode) {
rememberLazyMode = true;
showedLazyModeNotification = true;
Notifications.add("This language does not support lazy mode.", 0, {
important: true,
});
UpdateConfig.setLazyMode(false, true);

UpdateConfig.setLazyMode(false, false);
} else if (rememberLazyMode && !language.noLazyMode) {
UpdateConfig.setLazyMode(true, true);
}
Expand Down Expand Up @@ -1634,7 +1637,10 @@ ConfigEvent.subscribe((eventKey, eventValue, nosave) => {
ArabicLazyMode.set(eventValue as boolean);
}
if (eventValue === false) {
rememberLazyMode = false;
if (!showedLazyModeNotification) {
rememberLazyMode = false;
}
showedLazyModeNotification = false;
}
}
});
Expand Down