mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Fix initial operation potentially running before DI is completed
This commit is contained in:
parent
b13f193c8d
commit
4afbccfcff
@ -21,6 +21,8 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
public class ChangelogOverlay : OnlineOverlay<ChangelogHeader>
|
||||
{
|
||||
public override bool IsPresent => base.IsPresent || Scheduler.HasPendingTasks;
|
||||
|
||||
public readonly Bindable<APIChangelogBuild> Current = new Bindable<APIChangelogBuild>();
|
||||
|
||||
private Sample sampleBack;
|
||||
@ -126,8 +128,11 @@ namespace osu.Game.Overlays
|
||||
|
||||
private Task initialFetchTask;
|
||||
|
||||
private void performAfterFetch(Action action) => fetchListing()?.ContinueWith(_ =>
|
||||
private void performAfterFetch(Action action) => Schedule(() =>
|
||||
{
|
||||
fetchListing()?.ContinueWith(_ =>
|
||||
Schedule(action), TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
});
|
||||
|
||||
private Task fetchListing()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user