File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,11 +77,6 @@ public MainPage(
7777 _traceLogger = traceLogger ;
7878 _updateService = updateService ;
7979
80- if ( _currentVersionProvider . IsSupportedOS ( DeviceInfo . Version ) )
81- {
82- _updateService . CheckForUpdates ( _settings . IsPreReleaseEnabled , false ) . AndForget ( ) ;
83- }
84-
8580 activeLogsState . Select ( e => e . ActiveLogs ) ;
8681
8782 activeLogsState . SelectedValueChanged += ( sender , activeLogs ) =>
Original file line number Diff line number Diff line change 11// // Copyright (c) Microsoft Corporation.
22// // Licensed under the MIT License.
33
4+ using EventLogExpert . UI . Interfaces ;
45using EventLogExpert . UI . Services ;
56using EventLogExpert . UI . Store . FilterPane ;
67using Microsoft . AspNetCore . Components ;
@@ -15,6 +16,17 @@ public sealed partial class MainLayout
1516
1617 [ Inject ] private IDispatcher Dispatcher { get ; init ; } = null ! ;
1718
19+ [ Inject ] private ISettingsService Settings { get ; init ; } = null ! ;
20+
21+ [ Inject ] private IUpdateService UpdateService { get ; init ; } = null ! ;
22+
23+ protected override async Task OnInitializedAsync ( )
24+ {
25+ await UpdateService . CheckForUpdates ( Settings . IsPreReleaseEnabled , false ) ;
26+
27+ await base . OnInitializedAsync ( ) ;
28+ }
29+
1830 protected override async Task OnAfterRenderAsync ( bool firstRender )
1931 {
2032 if ( firstRender )
You can’t perform that action at this time.
0 commit comments