From 64598cc5dd746aa2879e9ed903edf7d5910f832b Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Mon, 5 Sep 2022 09:33:56 -0300 Subject: [PATCH] [FIX] Add loading prop on RoomActionsView to avoid double click (#4462) --- app/views/RoomActionsView/index.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/views/RoomActionsView/index.tsx b/app/views/RoomActionsView/index.tsx index 9aa9fa0f3..e2d911dbb 100644 --- a/app/views/RoomActionsView/index.tsx +++ b/app/views/RoomActionsView/index.tsx @@ -95,6 +95,7 @@ interface IRoomActionsViewState { canCreateTeam: boolean; canAddChannelToTeam: boolean; canConvertTeam: boolean; + loading: boolean; } class RoomActionsView extends React.Component { @@ -144,7 +145,8 @@ class RoomActionsView extends React.Component { - const { room, joined } = this.state; + const { room, joined, loading } = this.state; const { theme } = this.props; const { t, blocker } = room; @@ -923,6 +929,7 @@ class RoomActionsView extends React.Component this.onPressTouchable({ @@ -987,7 +994,7 @@ class RoomActionsView extends React.Component { - const { canEdit, canConvertTeam } = this.state; + const { canEdit, canConvertTeam, loading } = this.state; const canConvertTeamToChannel = canEdit && canConvertTeam && !!room?.teamMain; return ( @@ -996,6 +1003,7 @@ class RoomActionsView extends React.Component this.onPressTouchable({ event: this.convertTeamToChannel