chore: only run leave function if dialog result is yes (#2011)

This commit is contained in:
ggurdin 2025-02-28 14:37:57 -05:00 committed by GitHub
parent 04315eaf10
commit 2b17945194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -933,7 +933,10 @@ class ChatListController extends State<ChatList>
cancelLabel: L10n.of(context).cancel,
isDestructive: true,
);
if (confirmed == OkCancelResult.cancel) return;
// #Pangea
// if (confirmed == OkCancelResult.cancel) return;
if (confirmed != OkCancelResult.ok) return;
// Pangea#
if (!mounted) return;
// #Pangea

View file

@ -420,7 +420,7 @@ class PangeaChatDetailsView extends StatelessWidget {
: L10n.of(context).leaveRoomDescription,
isDestructive: true,
);
if (confirmed == OkCancelResult.cancel) return;
if (confirmed != OkCancelResult.ok) return;
final resp = await showFutureLoadingDialog(
context: context,
future: