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