summaryrefslogtreecommitdiffstats
path: root/toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs')
-rw-r--r--toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs14
1 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs b/toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs
index e101fadd16..f3e39ade28 100644
--- a/toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs
+++ b/toolkit/components/satchel/megalist/aggregator/Aggregator.sys.mjs
@@ -60,6 +60,16 @@ export class Aggregator {
this.#sources.push(source);
}
+ callFunction(dataSource, functionName) {
+ const source = this.#sources.find(
+ source => source.constructor.name === dataSource
+ );
+
+ if (source && source[functionName]) {
+ source[functionName]();
+ }
+ }
+
/**
* Exposes interface for a datasource to communicate with Aggregator.
*/
@@ -73,6 +83,10 @@ export class Aggregator {
refreshAllLinesOnScreen() {
aggregator.forEachViewModel(vm => vm.refreshAllLinesOnScreen());
},
+
+ setLayout(layout) {
+ aggregator.forEachViewModel(vm => vm.setLayout(layout));
+ },
};
}
}