mirror of
https://github.com/Kenshin/simpread.git
synced 2026-02-01 15:41:29 +00:00
Optimize import config plugins logic.
This commit is contained in:
parent
a393cafa29
commit
1d82ba08fb
@ -213,8 +213,11 @@ export default class PluginsOpt extends React.Component {
|
||||
});
|
||||
const complete = () => {
|
||||
storage.Plugins( result => {
|
||||
new Notify().Render( "本地插件已全部导入完毕。" );
|
||||
this.setState({ plugins: Object.values( storage.plugins ) });
|
||||
storage.option.plugins = Object.keys( storage.plugins );
|
||||
storage.Write( () => {
|
||||
new Notify().Render( "已从配置文件导入完毕。" );
|
||||
this.setState({ plugins: Object.values( storage.plugins ) });
|
||||
});
|
||||
}, storage.plugins );
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user