Skip to content

Commit dd84e97

Browse files
committed
Force get audiences after create
1 parent 432a2ea commit dd84e97

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/dashboard/Push/PushAudiencesIndex.react.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ export default class PushAudiencesIndex extends DashboardView {
4848
}
4949
}
5050

51-
getAudienceData() {
51+
getAudienceData(createdAudiences = 0) {
5252
this.props.schema.dispatch(SchemaStore.ActionTypes.FETCH);
5353
return this.props.pushaudiences.dispatch(PushAudiencesStore.ActionTypes.FETCH,
5454
{
5555
limit: PushConstants.SHOW_MORE_LIMIT,
56-
min: PushConstants.INITIAL_PAGE_SIZE,
56+
min: PushConstants.INITIAL_PAGE_SIZE + createdAudiences,
5757
xhrKey: XHR_KEY,
5858
})
5959
}
@@ -198,9 +198,10 @@ export default class PushAudiencesIndex extends DashboardView {
198198
this.setState({
199199
showCreateAudienceModal: false,
200200
});
201-
// After create the new audience update audience's list to get the new objectId
201+
// After create the new audience update audience's list to get the
202+
// new objectId
202203
this.setState({ loading: true });
203-
this.getAudienceData().then(() => {
204+
this.getAudienceData(1).then(() => {
204205
this.setState({ loading: false });
205206
}).catch(err => {
206207
console.error(err)

0 commit comments

Comments
 (0)