Skip to content

Conversation

PROWLERx15
Copy link
Contributor

Description

  • When deleting a dice roll, the top-nav title didn’t update.
  • Deleting a roll removed the digit from the input, but the title still showed the previous roll index.
  • Now the Title refreshes immediately and reflects the new state

Before:

image

After:

image

This pull request is categorized as a:

  • Bug fix

Checklist

  • I’ve run pytest and made sure all unit tests pass before submitting the PR

If you modified or added functionality/workflow, did you add new unit tests?

  • N/A

I have tested this PR on the following platforms/os:

@kdmukai
Copy link
Contributor

kdmukai commented Aug 26, 2025

Have not yet tested it, but looks like this is a good catch!

But we have the exact same lines of code to update the title when a character is added. So I'd prefer a refactor that is more DRY. Each of the if branches could set something like a title_needs_update bool and then in either case (when adding a char or deleting) the title is updated.

@kdmukai kdmukai moved this from SoB Needs Code Review to SoB In Progress in @SeedSigner Development Board Aug 26, 2025
@PROWLERx15 PROWLERx15 force-pushed the fix/update-dice-roll-count branch from 5f7deb5 to 6bbac94 Compare August 28, 2025 13:50
@PROWLERx15
Copy link
Contributor Author

PROWLERx15 commented Aug 28, 2025

I've added a title_needs_update flag on add/delete, which is set False at the beginning of the loop and is updated to True if a new input is added or deleted. A single unified block performs a top-nav title refresh afterward, removing duplicate update code in both branches.
Behavior unchanged; title stays in sync on both increment and decrement :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: SoB In Progress
Development

Successfully merging this pull request may close these issues.

2 participants