File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ private async Task<bool> checkForUpdateAsync(UpdateProgressNotification? notific
66
66
{
67
67
Activated = ( ) =>
68
68
{
69
- restartToApplyUpdate ( ) ;
69
+ Task . Run ( restartToApplyUpdate ) ;
70
70
return true ;
71
71
}
72
72
} ) ;
@@ -88,7 +88,11 @@ private async Task<bool> checkForUpdateAsync(UpdateProgressNotification? notific
88
88
{
89
89
notification = new UpdateProgressNotification
90
90
{
91
- CompletionClickAction = restartToApplyUpdate ,
91
+ CompletionClickAction = ( ) =>
92
+ {
93
+ Task . Run ( restartToApplyUpdate ) ;
94
+ return true ;
95
+ } ,
92
96
} ;
93
97
94
98
Schedule ( ( ) => notificationOverlay . Post ( notification ) ) ;
@@ -127,13 +131,10 @@ private async Task<bool> checkForUpdateAsync(UpdateProgressNotification? notific
127
131
return true ;
128
132
}
129
133
130
- private bool restartToApplyUpdate ( )
134
+ private async Task restartToApplyUpdate ( )
131
135
{
132
- // TODO: Migrate this to async flow whenever available (see https://github.com/ppy/osu/pull/28743#discussion_r1740505665).
133
- // Currently there's an internal Thread.Sleep(300) which will cause a stutter when the user clicks to restart.
134
- updateManager . WaitExitThenApplyUpdates ( pendingUpdate ? . TargetFullRelease ) ;
136
+ await updateManager . WaitExitThenApplyUpdatesAsync ( pendingUpdate ? . TargetFullRelease ) . ConfigureAwait ( false ) ;
135
137
Schedule ( ( ) => game . AttemptExit ( ) ) ;
136
- return true ;
137
138
}
138
139
}
139
140
}
Original file line number Diff line number Diff line change 26
26
<ItemGroup Label =" Package References" >
27
27
<PackageReference Include =" System.IO.Packaging" Version =" 8.0.0" />
28
28
<PackageReference Include =" DiscordRichPresence" Version =" 1.2.1.24" />
29
- <PackageReference Include =" Velopack" Version =" 0.0.598-g933b2ab " />
29
+ <PackageReference Include =" Velopack" Version =" 0.0.626 " />
30
30
</ItemGroup >
31
31
<ItemGroup Label =" Resources" >
32
32
<EmbeddedResource Include =" lazer.ico" />
You can’t perform that action at this time.
0 commit comments