File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class MainAppState extends State<MainApp> {
3838 //实例化多语言
3939 super .initState ();
4040 _delegate = AppLocalizationsDelegate ();
41+ model.dispatch ('config' , 'getTheme' );
4142 }
4243
4344 @override
Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ class ConfigModel {
4949 break ;
5050 case 'setTheme' :
5151 _appConfigInfo.theme = payload;
52- LocalStorage .set ('theme' ,payload);
52+ LocalStorage .set ('theme' , payload);
53+ break ;
54+ case 'getTheme' :
55+ await this .getTheme ();
5356 break ;
5457 }
5558 }
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ class MainStateModel extends Model with UserModel {
2222 'config' : config,
2323 };
2424 //
25- config.getTheme ();
2625 }
2726
2827 /**
You can’t perform that action at this time.
0 commit comments