mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +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))
|
||||
return;
|
||||
|
||||
Task.Factory.StartNew(async () => await game.Import(path), TaskCreationOptions.LongRunning)
|
||||
.ContinueWith(_ =>
|
||||
{
|
||||
// some files will be deleted after successful import, so we want to refresh the view.
|
||||
Task.Factory.StartNew(async () =>
|
||||
{
|
||||
await game.Import(path);
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
// should probably be exposed as a refresh method.
|
||||
fileSelector.CurrentPath.TriggerChange();
|
||||
});
|
||||
// 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();
|
||||
});
|
||||
}, TaskCreationOptions.LongRunning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user