File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,12 @@ async Task ActivateAsync()
116116 /// <summary>
117117 /// Invoked when the application is activated.
118118 /// </summary>
119- public void OnActivated ( AppActivationArguments activatedEventArgs )
119+ public async Task OnActivatedAsync ( AppActivationArguments activatedEventArgs )
120120 {
121121 Logger . LogInformation ( $ "The app is being activated. Activation type: { activatedEventArgs . Data . GetType ( ) . Name } ") ;
122122
123123 // InitializeApplication accesses UI, needs to be called on UI thread
124- _ = MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( )
124+ await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( )
125125 => MainWindow . Instance . InitializeApplicationAsync ( activatedEventArgs . Data ) ) ;
126126 }
127127
Original file line number Diff line number Diff line change @@ -158,12 +158,12 @@ private static void Main()
158158 } ) ;
159159 }
160160
161- private static void OnActivated ( object ? sender , AppActivationArguments args )
161+ private static async void OnActivated ( object ? sender , AppActivationArguments args )
162162 {
163163 if ( App . Current is App thisApp )
164164 {
165165 // WINUI3: Verify if needed or OnLaunched is called
166- thisApp . OnActivated ( args ) ;
166+ await thisApp . OnActivatedAsync ( args ) ;
167167 }
168168 }
169169
You can’t perform that action at this time.
0 commit comments