mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix possible null assignment to non-nullable entities.
This commit is contained in:
@@ -190,9 +190,15 @@ public sealed class MainWindowViewModel : ViewModelBase
|
||||
set => this.RaiseAndSetIfChanged(ref _devicesSupported, value);
|
||||
}
|
||||
|
||||
public bool NativeMenuSupported =>
|
||||
NativeMenu.GetIsNativeMenuExported((Application.Current?.ApplicationLifetime as
|
||||
IClassicDesktopStyleApplicationLifetime)?.MainWindow);
|
||||
public bool NativeMenuSupported
|
||||
{
|
||||
get
|
||||
{
|
||||
Window mainWindow = (Application.Current?.ApplicationLifetime as
|
||||
IClassicDesktopStyleApplicationLifetime)?.MainWindow;
|
||||
return mainWindow is not null && NativeMenu.GetIsNativeMenuExported(mainWindow);
|
||||
}
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
public string Greeting => UI.Welcome_to_Aaru;
|
||||
|
||||
Reference in New Issue
Block a user