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()
116
116
/// <summary>
117
117
/// Invoked when the application is activated.
118
118
/// </summary>
119
- public void OnActivated ( AppActivationArguments activatedEventArgs )
119
+ public async Task OnActivatedAsync ( AppActivationArguments activatedEventArgs )
120
120
{
121
121
Logger . LogInformation ( $ "The app is being activated. Activation type: { activatedEventArgs . Data . GetType ( ) . Name } ") ;
122
122
123
123
// InitializeApplication accesses UI, needs to be called on UI thread
124
- _ = MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( )
124
+ await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( )
125
125
=> MainWindow . Instance . InitializeApplicationAsync ( activatedEventArgs . Data ) ) ;
126
126
}
127
127
Original file line number Diff line number Diff line change @@ -158,12 +158,12 @@ private static void Main()
158
158
} ) ;
159
159
}
160
160
161
- private static void OnActivated ( object ? sender , AppActivationArguments args )
161
+ private static async void OnActivated ( object ? sender , AppActivationArguments args )
162
162
{
163
163
if ( App . Current is App thisApp )
164
164
{
165
165
// WINUI3: Verify if needed or OnLaunched is called
166
- thisApp . OnActivated ( args ) ;
166
+ await thisApp . OnActivatedAsync ( args ) ;
167
167
}
168
168
}
169
169
You can’t perform that action at this time.
0 commit comments