[Editor] Dispatch changes in prefs enableAltTextModelDownload and enableGuessAltText to the viewer (bug 1912024)

The user can change a setting in a tab and it must have an effect in the current viewer.
This commit is contained in:
Calixte Denizet 2024-08-07 15:37:55 +02:00
parent 341a0b6d47
commit 92ade5495b
6 changed files with 164 additions and 53 deletions

View file

@ -79,6 +79,10 @@ class FakeMLManager {
this.enableAltTextModelDownload = enableAltTextModelDownload;
}
setEventBus(eventBus, abortSignal) {
this.eventBus = eventBus;
}
async isEnabledFor(_name) {
return this.enableGuessAltText;
}