Skip to content

Code Quality: Optimized GetModifierCode#18317

Merged
yair100 merged 1 commit into
files-community:mainfrom
KrisVandermotten:GetModifierCode
Apr 10, 2026
Merged

Code Quality: Optimized GetModifierCode#18317
yair100 merged 1 commit into
files-community:mainfrom
KrisVandermotten:GetModifierCode

Conversation

@KrisVandermotten
Copy link
Copy Markdown
Contributor

Resolved / Related Issues

Steps used to test these changes

  1. Opened Files
  2. Observed that HotKey labels still work as before

@yair100
Copy link
Copy Markdown
Member

yair100 commented Mar 29, 2026

What happens if you change languages at run time?

@KrisVandermotten
Copy link
Copy Markdown
Contributor Author

KrisVandermotten commented Apr 4, 2026

What happens if you change languages at run time?

The exact same thing as before. As you can see, LocalizedLabel is still called in exactly the same places, and it is still using LocalizedModifiers. Nothing has changed there.

Just to be clear: LocalizedModifiers is initialized at startup, and never updated. So the LocalizedLabel will not be updated either, as before. If you think that's a bug, I can fix it in this PR by not caching LocalizedModifiers.

Copy link
Copy Markdown
Member

@yair100 yair100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yair100 yair100 merged commit 439f8ca into files-community:main Apr 10, 2026
6 checks passed
@KrisVandermotten KrisVandermotten deleted the GetModifierCode branch April 10, 2026 17:20
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.

Code Quality: HotKey GetModifierCode implementations can be optimized

2 participants