Skip to content

Remove unused _edited field from RemoveTextForHearingImpairedViewModel#10519

Merged
niksedk merged 2 commits intoSubtitleEdit:mainfrom
ivandrofly:remove-unused-edited-field
Apr 9, 2026
Merged

Remove unused _edited field from RemoveTextForHearingImpairedViewModel#10519
niksedk merged 2 commits intoSubtitleEdit:mainfrom
ivandrofly:remove-unused-edited-field

Conversation

@ivandrofly
Copy link
Copy Markdown
Member

@ivandrofly ivandrofly commented Apr 2, 2026

Summary

  • _edited (List<Paragraph>) was never populated, so the if (_edited.Contains(p)) branch in GeneratePreview was dead code
  • Removed the field declaration, its initialization in the constructor, and the unreachable branch

Test plan

  • Open Remove Text for Hearing Impaired dialog and verify preview still generates correctly
  • Confirm OK applies fixes as expected

ivandrofly and others added 2 commits April 2, 2026 14:21
The _edited list was never populated, making the branch that checked
it dead code. Removed the field, its initialization, and the unreachable
branch in GeneratePreview.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…unnecessary variable and inline initialization
@niksedk niksedk merged commit d056900 into SubtitleEdit:main Apr 9, 2026
1 check passed
@ivandrofly ivandrofly deleted the remove-unused-edited-field branch April 9, 2026 19:55
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.

2 participants