async update(settings, showToast = true, saveFile = true) {
		if (typeof settings === "boolean") {
			showToast = settings;
			settings = undefined;
		}

		const onupdate = [...this.#on.update];
		const onupdateAfter = [...this.#on["update:after"]];

		if (settings) {
			Object.keys(settings).forEach((key) => {
				if (key in this.value) this.value[key] = settings[key];
			});
		}

		const changedSettings = this.#getChangedKeys();
		changedSettings.forEach((setting) => {
			this.#applySettings(setting);
			const listeners = this.#on[`update:${setting}`];
			if (Array.isArray(listeners)) {
				onupdate.push(...listeners);
			}
			onupdate.forEach((listener) => listener(this.value[setting]));
		});

		if (saveFile) await this.#save();
		if (showToast) toast(strings["settings saved"]);

		changedSettings.forEach((setting) => {
			const listeners = this.#on[`update:${setting}:after`];
			if (Array.isArray(listeners)) {
				onupdateAfter.push(...listeners);
			}
			onupdateAfter.forEach((listener) => listener(this.value[setting]));
		});
	}
@param {Object} [settings] - if provided, the settings will be updated
@param {Boolean} [showToast] - if false, the toast will not be shown
default is true
@param {Boolean} [saveFile] - if false, the settings will not be saved to the file,
default is true