(core) Move theme from ConfigNotifier to ThemeNotifier

Summary:
This reverts the behavior of onOptions, which had unintentionally
changed recently and no longer matched the API documentation.

Test Plan: Existing tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4064
This commit is contained in:
George Gevoian
2023-10-06 09:17:39 -04:00
parent a101337213
commit 1be1e5f647
12 changed files with 127 additions and 127 deletions

View File

@@ -459,7 +459,7 @@ export class CustomSectionConfig extends Disposable {
}
bundleChanges(() => {
// Reset whether widget should render after `grist.ready()`.
_section.customDef.renderAfterReady(false);
_section.customDef.renderAfterReady(selectedWidget.renderAfterReady ?? false);
// Clear access level
_section.customDef.access(AccessLevel.none);
// When widget wants some access, set desired access level.
@@ -627,16 +627,16 @@ export class CustomSectionConfig extends Disposable {
protected async _getWidgets() {
const api = this._gristDoc.app.topAppModel.api;
const wigets = await api.getWidgets();
const widgets = await api.getWidgets();
// Request for rest of the widgets.
if (this._canSelect) {
// From the start we will provide single widget definition
// that was chosen previously.
if (this._section.customDef.widgetDef.peek()) {
wigets.push(this._section.customDef.widgetDef.peek()!);
widgets.push(this._section.customDef.widgetDef.peek()!);
}
}
this._widgets.set(wigets);
this._widgets.set(widgets);
}
private _accept() {