bluebubbles-app icon indicating copy to clipboard operation
bluebubbles-app copied to clipboard

Deleting a chat conversation keeps the popup menu item up after confirmation dialog

Open nshanny opened this issue 1 year ago • 0 comments

Windows Desktop App

When you right click to delete a chat conversation a confirmation dialog is shown to the user. The original menu popup is not dismissed after answering the confirmation dialog. The code fix is easy. If interested, I will submit a PR from my fork.

--

diff --git a/lib/helpers/ui/ui_helpers.dart b/lib/helpers/ui/ui_helpers.dart index 1c908126..fc95c2c6 100644 --- a/lib/helpers/ui/ui_helpers.dart +++ b/lib/helpers/ui/ui_helpers.dart @@ -280,6 +280,7 @@ Future showConversationTileMenu(BuildContext context, ConversationTileCont child: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async {

  •          Navigator.pop(context); // Remove PopupMenuItem
             showDialog(
               barrierDismissible: false,
               context: context,
    

@@ -298,7 +299,7 @@ Future showConversationTileMenu(BuildContext context, ConversationTileCont TextButton( child: Text("No", style: context.theme.textTheme.bodyLarge!.copyWith(color: context.theme.colorScheme.primary)), onPressed: () {

  •                      Navigator.of(context).pop();
    
  •                      Navigator.of(context).pop(); //Remove AlertDialog
                       },
                     ),
                     TextButton(
    

@@ -306,7 +307,7 @@ Future showConversationTileMenu(BuildContext context, ConversationTileCont onPressed: () async { chats.removeChat(chat); Chat.softDelete(chat);

  •                      Navigator.pop(context);
    
  •                      Navigator.pop(context); //Remove AlertDialog
                       },
    

nshanny avatar Apr 25 '24 00:04 nshanny