mirror of
https://github.com/osukey/osukey.git
synced 2025-05-15 02:27:33 +09:00
Merge remote-tracking branch 'upstream/master' into smoogipoo-update-framework
This commit is contained in:
commit
37bae8c840
@ -506,22 +506,24 @@ namespace osu.Game
|
|||||||
// we could avoid the need for scheduling altogether.
|
// we could avoid the need for scheduling altogether.
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
if (asyncLoadStream != null)
|
var previousLoadStream = asyncLoadStream;
|
||||||
{
|
|
||||||
//chain with existing load stream
|
//chain with existing load stream
|
||||||
asyncLoadStream = asyncLoadStream.ContinueWith(async t =>
|
asyncLoadStream = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
if (previousLoadStream != null)
|
||||||
|
await previousLoadStream;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Loading {d}...", LoggingTarget.Debug);
|
||||||
await LoadComponentAsync(d, add);
|
await LoadComponentAsync(d, add);
|
||||||
|
Logger.Log($"Loaded {d}!", LoggingTarget.Debug);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else
|
|
||||||
asyncLoadStream = LoadComponentAsync(d, add);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,6 +240,15 @@ namespace osu.Game.Overlays
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void PopIn()
|
||||||
|
{
|
||||||
|
base.PopIn();
|
||||||
|
|
||||||
|
// Queries are allowed to be run only on the first pop-in
|
||||||
|
if (getSetsRequest == null)
|
||||||
|
Scheduler.AddOnce(updateSearch);
|
||||||
|
}
|
||||||
|
|
||||||
private SearchBeatmapSetsRequest getSetsRequest;
|
private SearchBeatmapSetsRequest getSetsRequest;
|
||||||
|
|
||||||
private readonly Bindable<string> currentQuery = new Bindable<string>();
|
private readonly Bindable<string> currentQuery = new Bindable<string>();
|
||||||
@ -251,16 +260,22 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
queryChangedDebounce?.Cancel();
|
queryChangedDebounce?.Cancel();
|
||||||
|
|
||||||
if (!IsLoaded) return;
|
if (!IsLoaded)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (State == Visibility.Hidden)
|
||||||
|
return;
|
||||||
|
|
||||||
BeatmapSets = null;
|
BeatmapSets = null;
|
||||||
ResultAmounts = null;
|
ResultAmounts = null;
|
||||||
|
|
||||||
getSetsRequest?.Cancel();
|
getSetsRequest?.Cancel();
|
||||||
|
|
||||||
if (api == null) return;
|
if (api == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Header.Tabs.Current.Value == DirectTab.Search && (Filter.Search.Text == string.Empty || currentQuery == string.Empty)) return;
|
if (Header.Tabs.Current.Value == DirectTab.Search && (Filter.Search.Text == string.Empty || currentQuery == string.Empty))
|
||||||
|
return;
|
||||||
|
|
||||||
previewTrackManager.StopAnyPlaying(this);
|
previewTrackManager.StopAnyPlaying(this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user