You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Tune types in ReactionsRow
This commit is contained in:
@@ -113,7 +113,7 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
componentDidUpdate(prevProps: IProps) {
|
||||
if (prevProps.reactions !== this.props.reactions) {
|
||||
this.props.reactions.on("Relations.add", this.onReactionsChange);
|
||||
this.props.reactions.on("Relations.remove", this.onReactionsChange);
|
||||
@@ -127,7 +127,7 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
onReactionsChange = () => {
|
||||
private onReactionsChange = () => {
|
||||
// TODO: Call `onHeightChanged` as needed
|
||||
this.setState({
|
||||
myReactions: this.getMyReactions(),
|
||||
@@ -138,7 +138,7 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
getMyReactions() {
|
||||
private getMyReactions() {
|
||||
const reactions = this.props.reactions;
|
||||
if (!reactions) {
|
||||
return null;
|
||||
@@ -151,7 +151,7 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
|
||||
return [...myReactions.values()];
|
||||
}
|
||||
|
||||
onShowAllClick = () => {
|
||||
private onShowAllClick = () => {
|
||||
this.setState({
|
||||
showAll: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user