mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Replace usage of .Result
with .WaitSafelyForResult
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
@ -45,9 +46,9 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
Action = () =>
|
||||
{
|
||||
checkForUpdatesButton.Enabled.Value = false;
|
||||
Task.Run(updateManager.CheckForUpdateAsync).ContinueWith(t => Schedule(() =>
|
||||
Task.Run(updateManager.CheckForUpdateAsync).ContinueWith(task => Schedule(() =>
|
||||
{
|
||||
if (!t.Result)
|
||||
if (!task.WaitSafelyForResult())
|
||||
{
|
||||
notifications?.Post(new SimpleNotification
|
||||
{
|
||||
|
Reference in New Issue
Block a user