Prevent "left room" message from showing twice

This commit is contained in:
Andy Uhnak
2022-03-21 17:09:48 +00:00
parent 6fa666e49b
commit 74f4daa642
+8
View File
@@ -159,6 +159,9 @@ static CGSize kThreadListBarButtonItemImageSize;
// Tell whether the view controller is appeared or not.
BOOL isAppeared;
// A flag indicating whether a room has been left
BOOL isRoomLeft;
// Tell whether the room has a Jitsi call or not.
BOOL hasJitsiCall;
@@ -2295,6 +2298,11 @@ static CGSize kThreadListBarButtonItemImageSize;
}
- (void)notifyDelegateOnLeaveRoomIfNecessary {
if (isRoomLeft) {
return;
}
isRoomLeft = YES;
if (self.delegate)
{
[self.delegate roomViewControllerDidLeaveRoom:self];