mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 15:53:19 +08:00
Refresh view after import completes
This commit is contained in:
parent
db4f2d5ffb
commit
0d4ac2f748
@ -154,17 +154,17 @@ namespace osu.Game.Screens.Import
|
|||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Task.Factory.StartNew(async () => await game.Import(path), TaskCreationOptions.LongRunning)
|
Task.Factory.StartNew(async () =>
|
||||||
.ContinueWith(_ =>
|
{
|
||||||
{
|
await game.Import(path);
|
||||||
// some files will be deleted after successful import, so we want to refresh the view.
|
|
||||||
|
|
||||||
Schedule(() =>
|
// some files will be deleted after successful import, so we want to refresh the view.
|
||||||
{
|
Schedule(() =>
|
||||||
// should probably be exposed as a refresh method.
|
{
|
||||||
fileSelector.CurrentPath.TriggerChange();
|
// should probably be exposed as a refresh method.
|
||||||
});
|
fileSelector.CurrentPath.TriggerChange();
|
||||||
});
|
});
|
||||||
|
}, TaskCreationOptions.LongRunning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user