✨ misc
This commit is contained in:
parent
3d565424ae
commit
9f54e7046c
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
* @Author : frostime
|
||||
* @Date : 2023-12-17 18:28:19
|
||||
* @FilePath : /src/libs/setting-utils.ts
|
||||
* @LastEditTime : 2024-04-30 16:42:23
|
||||
* @LastEditTime : 2024-04-30 22:15:25
|
||||
* @Description :
|
||||
*/
|
||||
|
||||
|
@ -105,7 +105,7 @@ export class SettingUtils {
|
|||
args.callback(data);
|
||||
}
|
||||
this.plugin.data[this.name] = data;
|
||||
this.save();
|
||||
this.save(data);
|
||||
},
|
||||
destroyCallback: () => {
|
||||
//Restore the original value
|
||||
|
@ -128,8 +128,8 @@ export class SettingUtils {
|
|||
return data;
|
||||
}
|
||||
|
||||
async save() {
|
||||
let data = this.dump();
|
||||
async save(data?: any) {
|
||||
data = data ?? this.dump();
|
||||
await this.plugin.saveData(this.file, this.dump());
|
||||
console.debug('Save config:', data);
|
||||
return data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue