From e22bd456089ad76efd76f50b960ba47b1dadac60 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 13 May 2019 15:00:43 +0100 Subject: [PATCH] Clarify `ReactionsRow` forceUpdate usage --- src/components/views/messages/ReactionsRow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/messages/ReactionsRow.js b/src/components/views/messages/ReactionsRow.js index dad604a4d5..ffb81e1a38 100644 --- a/src/components/views/messages/ReactionsRow.js +++ b/src/components/views/messages/ReactionsRow.js @@ -68,6 +68,9 @@ export default class ReactionsRow extends React.PureComponent { this.setState({ myReactions: this.getMyReactions(), }); + // Using `forceUpdate` for the moment, since we know the overall set of reactions + // has changed (this is triggered by events for that purpose only) and + // `PureComponent`s shallow state / props compare would otherwise filter this out. this.forceUpdate(); }