HomePhabricator
Diffusion Comm 35f6f01910c0

[lib] Avoid directly mutating MessageStore in messageStorePruneActionType

Description

[lib] Avoid directly mutating MessageStore in messageStorePruneActionType

Summary: I noticed that this code was directly mutating the objects in the MessageStore instead of treating them as immutable. This makes it impossible for selectors to notice changes and update components that are watching the MessageStore, and thus is considered bad practice. This diff updates the code to avoid mutating the objects directly.

Test Plan: Flow, careful reading

Reviewers: palys-swm

Reviewed By: palys-swm

Subscribers: KatPo, zrebcu411, Adrian, atul, subnub

Differential Revision: https://phabricator.ashoat.com/D915

Details

Provenance
ashoatAuthored on Mar 17 2021, 8:09 PM
Reviewer
tomek
Differential Revision
Restricted Differential Revision
Parents
rCOMM47c08bffda8a: [web] Handle error when threadInfo is not set in thread settings modal
Branches
Unknown
Tags
Unknown