Feature/change progress colors (#6)
* Added Settings Actions * Created App Settings and Repo + Entity * Code cleanup Time Progress * Created App Settings Middleware * Has Progresses ad has Settings loaded * Created Load and Update Settings reducers * Added Settings store middleware to renamed store middleware * Load Default Settings if not Saved. Use Redux AppState to showprogress colors. Colors are not yet changeable. * Added ColorPicker for Done and Left Color Fixed Loading App Settings Bug * Fixed Version Number * Fixed Android App Logo * Extracted Color Settings into Widget * Fixed Home Settings Tab Layout and Color Settings Button now show Text in complementary color
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							c580e45361
						
					
				
				
					commit
					b520d56d1a
				
			| @@ -1,7 +1,24 @@ | ||||
| import 'package:redux/redux.dart'; | ||||
| import 'package:time_progress_tracker/models/app_settings.dart'; | ||||
| import 'package:time_progress_tracker/models/app_state.dart'; | ||||
| import 'package:time_progress_tracker/models/time_progress.dart'; | ||||
|  | ||||
| class LoadSettingsAction {} | ||||
|  | ||||
| class AppSettingsLoadedActions { | ||||
|   final AppSettings appSettings; | ||||
|  | ||||
|   AppSettingsLoadedActions(this.appSettings); | ||||
| } | ||||
|  | ||||
| class UpdateAppSettingsActions { | ||||
|   final AppSettings appSettings; | ||||
|  | ||||
|   UpdateAppSettingsActions(this.appSettings); | ||||
| } | ||||
|  | ||||
| class AppSettingsNotLoadedAction {} | ||||
|  | ||||
| class LoadTimeProgressListAction {} | ||||
|  | ||||
| class TimeProgressListLoadedAction { | ||||
| @@ -32,7 +49,10 @@ class DeleteTimeProgressAction { | ||||
| } | ||||
|  | ||||
| void loadTimeProgressListIfUnloaded(Store<AppState> store) { | ||||
|   if (!store.state.hasLoaded) { | ||||
|   if (!store.state.hasProgressesLoaded) | ||||
|     store.dispatch(LoadTimeProgressListAction()); | ||||
|   } | ||||
| } | ||||
|  | ||||
| void loadSettingsIfUnloaded(Store<AppState> store) { | ||||
|   if (!store.state.hasSettingsLoaded) store.dispatch(LoadSettingsAction()); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user