Skip to content

Fix inverted logic in RemoveBlog confirmation dialog#2

Draft
Copilot wants to merge 2 commits into
issue/removeBlogIssuefrom
copilot/fix-remove-blog-functionality
Draft

Fix inverted logic in RemoveBlog confirmation dialog#2
Copilot wants to merge 2 commits into
issue/removeBlogIssuefrom
copilot/fix-remove-blog-functionality

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 13, 2025

Checklist

Confirm you have completed the following actions prior to submitting this PR.

  • There is an existing issue report for this PR.
  • I have forked this project.
  • I have created a feature branch.
  • My changes have been committed.
  • I have pushed my changes to the branch.

Title

Fix inverted logic in RemoveBlog confirmation dialog

Description

The "Remove Blog" button failed to remove blogs due to inverted boolean logic in the confirmation dialog handler. The condition checked !ShowYesNoQuestion() causing removal on "No" instead of "Yes". Additionally, when confirmation dialogs were disabled, no removal occurred.

Before:

if (!_messageService.ShowYesNoQuestion(message))
{
    RemoveBlog(blogs, true);
}
// No else clause - blogs never removed when DisplayConfirmationDialog is false

After:

if (_messageService.ShowYesNoQuestion(message))
{
    RemoveBlog(blogs, true);
}
else
{
    RemoveBlog(blogs, true);  // Handle disabled confirmation dialog
}

Issue Resolution

Tell us which issue this PR fixes.

This Pull Request Fixes #(issue number not provided in problem statement)

Proposed Changes

List your proposed changes below.

  • Removed negation operator from ShowYesNoQuestion() condition check (line 768)
  • Added else clause to handle removal when DisplayConfirmationDialog is disabled (lines 773-776)

New or Changed Features

Does this PR provide new or changed features or enhancements? If so, what is included in this PR?

  • N/A - Bug fix only
Original prompt

This section details on the original issue you should resolve

<issue_title>Clicking "Remove Blog" does not remove the blog</issue_title>
<issue_description>Describe the bug
Clicking "Remove Blog" seems to do nothing. The selected blog is still present in the list even after clicking "Remove Blog".</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: r-ramesh <18268800+r-ramesh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix remove blog functionality to delete selected blog Fix inverted logic in RemoveBlog confirmation dialog Nov 13, 2025
Copilot AI requested a review from r-ramesh November 13, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking "Remove Blog" does not remove the blog

2 participants