Fix edit theme dialog title logic #2205
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
As you can see from the code and the actual behavior, both share the same code whether adding or editing a theme. So why does the title show up as "Edit Theme" no matter what? It does seem strange in a way.
This feature appears to have been added in v2.0.0, but no one seems to have cared about the issue during the two years.
Nonetheless, when I realized this recently, I decided to fix it. Hopefully this will make things clearer for those users who may not be able to tell the difference.
Now, when the "Add theme" button is clicked, the dialog title will show "Add theme". If you right-click on a user-created theme, the dialog title will show "Edit theme".
Picture Time!
English (en-US)
🟥 Before
🔵 After
Simplified Chinese (zh-CN)
🟥 Before
🔵 After