Skip to content

Commit

Permalink
fix: also clear identities and reset loaders when flushing store
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Feb 21, 2024
1 parent 6e3c1b3 commit 4c6b8e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/messaging/stores/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ function FeedStore() {
* @return {boolean} Message flush status
*/
flush() {
// Clear identities
this.feed.identities = {};

// Reset all loaders
for (let direction in this.feed.loaders) {
this.feed.loaders[direction] = false;
}

// Flush entries? (if any)
if (this.feed.entries.length > 0) {
// Clear all public stores
this.feed.entries = [];
Expand Down

0 comments on commit 4c6b8e5

Please sign in to comment.