schemes: fix previews not updating
Monitor was being garbage collected cause it wasn't stored anywhere
This commit is contained in:
parent
43c34d02db
commit
d9c618701c
1 changed files with 2 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ export default class Schemes extends GObject.Object {
|
|||
}
|
||||
|
||||
readonly #schemeDir: string = `${DATA}/scripts/data/schemes`;
|
||||
readonly #monitor;
|
||||
|
||||
#map: { [k: string]: Scheme } = {};
|
||||
|
||||
|
|
@ -90,6 +91,6 @@ export default class Schemes extends GObject.Object {
|
|||
super();
|
||||
|
||||
this.update().catch(console.error);
|
||||
monitorDirectory(this.#schemeDir, () => this.update().catch(console.error), true);
|
||||
this.#monitor = monitorDirectory(this.#schemeDir, () => this.update().catch(console.error), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue