Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5930 from matrix-org/travis/error-view-fix
Browse files Browse the repository at this point in the history
Handle possible edge case with getting stuck in "unsent messages" bar
  • Loading branch information
turt2live authored Apr 27, 2021
2 parents 28d3a0c + b9bd83a commit afd53d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/structures/RoomStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ export default class RoomStatusBar extends React.Component {

_onRoomLocalEchoUpdated = (event, room, oldEventId, oldStatus) => {
if (room.roomId !== this.props.room.roomId) return;
this.setState({unsentMessages: getUnsentMessages(this.props.room)});
const messages = getUnsentMessages(this.props.room);
this.setState({
unsentMessages: messages,
isResending: messages.length > 0 && this.state.isResending,
});
};

// Check whether current size is greater than 0, if yes call props.onVisible
Expand Down

0 comments on commit afd53d8

Please sign in to comment.