Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nshanny opened this issue Apr 25, 2024 · 0 comments
Labels
Fixed Internally Issue has been fixed, but fix has not yet been released

Comments

@nshanny
Copy link

nshanny commented Apr 25, 2024

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
                       },
    
@zlshames zlshames added the Fixed Internally Issue has been fixed, but fix has not yet been released label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Internally Issue has been fixed, but fix has not yet been released
Projects
None yet
Development

No branches or pull requests

2 participants