More work with redux, and location edit (wip)
This commit is contained in:
parent
e97a5a1a9f
commit
e55edce3d4
17 changed files with 311 additions and 186 deletions
|
|
@ -8,8 +8,8 @@ final yourLocationsReducer = combineReducers<List<YourLocation>>([
|
|||
_addedYourLocation),
|
||||
new TypedReducer<List<YourLocation>, DeletedYourLocationAction>(
|
||||
_deletedYourLocation),
|
||||
new TypedReducer<List<YourLocation>, UpdateLocalYourLocationAction>(
|
||||
_updateLocalYourLocation),
|
||||
new TypedReducer<List<YourLocation>, UpdateYourLocationAction>(
|
||||
_updateYourLocation),
|
||||
new TypedReducer<List<YourLocation>, ToggledSubscriptionAction>(
|
||||
_toggledSubscriptionAction)
|
||||
]);
|
||||
|
|
@ -26,8 +26,8 @@ List<YourLocation> _deletedYourLocation(
|
|||
.toList();
|
||||
}
|
||||
|
||||
List<YourLocation> _updateLocalYourLocation(
|
||||
List<YourLocation> yourLocations, UpdateLocalYourLocationAction action) {
|
||||
List<YourLocation> _updateYourLocation(
|
||||
List<YourLocation> yourLocations, UpdateYourLocationAction action) {
|
||||
return yourLocations
|
||||
.map((yourLocation) =>
|
||||
yourLocation.id == action.loc.id ? action.loc : yourLocation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue