Fix not receiving messages after deleting all

This commit is contained in:
Jannis Mattheis 2018-11-10 15:54:44 +01:00
parent 81d00cbd57
commit 985c7cf870
1 changed files with 3 additions and 3 deletions

View File

@ -28,10 +28,10 @@ export class MessagesStore {
} }
private stateOf = (appId: number, create = true) => { private stateOf = (appId: number, create = true) => {
if (this.state[appId] || !create) { if (!this.state[appId] && create) {
return this.state[appId] || this.emptyState(); this.state[appId] = this.emptyState();
} }
return (this.state[appId] = this.emptyState()); return this.state[appId] || this.emptyState();
}; };
public canLoadMore = (appId: number) => this.stateOf(appId, /*create*/ false).hasMore; public canLoadMore = (appId: number) => this.stateOf(appId, /*create*/ false).hasMore;