File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Flow.Launcher.Infrastructure Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -464,19 +464,18 @@ private static string GetLanguageTag(uint langId)
464
464
// https://github.com/dotnet/winforms/pull/8573#issuecomment-1542600949
465
465
//
466
466
// NOTE: this logic may break in future versions of Windows since it is not documented.
467
- if ( langId is ( int ) PInvoke . LOCALE_TRANSIENT_KEYBOARD1
468
- or ( int ) PInvoke . LOCALE_TRANSIENT_KEYBOARD2
469
- or ( int ) PInvoke . LOCALE_TRANSIENT_KEYBOARD3
470
- or ( int ) PInvoke . LOCALE_TRANSIENT_KEYBOARD4 )
467
+ if ( langId is PInvoke . LOCALE_TRANSIENT_KEYBOARD1
468
+ or PInvoke . LOCALE_TRANSIENT_KEYBOARD2
469
+ or PInvoke . LOCALE_TRANSIENT_KEYBOARD3
470
+ or PInvoke . LOCALE_TRANSIENT_KEYBOARD4 )
471
471
{
472
- using RegistryKey key = Registry . CurrentUser . OpenSubKey ( UserProfileRegistryPath ) ;
473
- if ( key is not null && key . GetValue ( "Languages" ) is string [ ] languages )
472
+ using var key = Registry . CurrentUser . OpenSubKey ( UserProfileRegistryPath ) ;
473
+ if ( key ? . GetValue ( "Languages" ) is string [ ] languages )
474
474
{
475
475
foreach ( string language in languages )
476
476
{
477
- using RegistryKey subKey = key . OpenSubKey ( language ) ;
478
- if ( subKey is not null
479
- && subKey . GetValue ( "TransientLangId" ) is int transientLangId
477
+ using var subKey = key . OpenSubKey ( language ) ;
478
+ if ( subKey ? . GetValue ( "TransientLangId" ) is int transientLangId
480
479
&& transientLangId == langId )
481
480
{
482
481
return language ;
You can’t perform that action at this time.
0 commit comments