Merge pull request #956 from sharetribe/fix-ModalMissingInformation-showing-too-early-take2

Fix modal missing information showing too early take2
This commit is contained in:
Vesa Luusua 2018-11-20 15:33:20 +02:00 committed by GitHub
commit a612a61772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -14,6 +14,10 @@ way to update this template, but currently, we follow a pattern:
## Upcoming version 2018-11-XX
## v2.3.2 2018-11-20
* [fix] Take 2: don't set currentUserHasListings if fetched listing is in draft state.
[#956](https://github.com/sharetribe/flex-template-web/pull/956)
* [fix] PriceFilter styles
[#954](https://github.com/sharetribe/flex-template-web/pull/954)

View file

@ -1,6 +1,6 @@
{
"name": "app",
"version": "2.3.0",
"version": "2.3.2",
"private": true,
"license": "Apache-2.0",
"dependencies": {

View file

@ -3,7 +3,6 @@ import { types as sdkTypes } from '../../util/sdkLoader';
import { storableError } from '../../util/errors';
import { addMarketplaceEntities } from '../../ducks/marketplaceData.duck';
import * as log from '../../util/log';
import { fetchCurrentUserHasListingsSuccess } from '../../ducks/user.duck';
const { UUID } = sdkTypes;
@ -274,11 +273,6 @@ export function requestCreateListingDraft(data) {
// Add the created listing to the marketplace data
dispatch(addMarketplaceEntities(response));
// We must update the user duck since this might be the first
// listing for the user, therefore changing the
// currentUserHasListings flag in the store.
dispatch(fetchCurrentUserHasListingsSuccess(true));
// Modify store to understand that we have created listing and can redirect away
dispatch(createListingDraftSuccess(response));
return response;