From c877a0600bc198de6a33dc0c049345b7f5d20190 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 6 Dec 2022 15:27:18 -0300 Subject: [PATCH] Fix setReadOnly calls on RoomView --- app/views/RoomView/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 97e32f19c..fc27de1dc 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -409,7 +409,13 @@ class RoomView extends React.Component { if (insets.left !== prevProps.insets.left || insets.right !== prevProps.insets.right) { this.setHeader(); } - this.setReadOnly(); + if ( + !dequal(prevState.roomUpdate.muted, roomUpdate.muted) || + prevState.roomUpdate.archived !== roomUpdate.archived || + prevState.roomUpdate.ro !== roomUpdate.ro + ) { + this.setReadOnly(); + } } updateOmnichannel = async () => {