mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Revert ruleset when not applied filters (includes scope change)
This commit is contained in:
parent
cb7c2f713b
commit
9fa39cd34e
@ -18,6 +18,8 @@ namespace osu.Game.Overlays
|
|||||||
protected Bindable<RulesetInfo> Ruleset => Header.Ruleset;
|
protected Bindable<RulesetInfo> Ruleset => Header.Ruleset;
|
||||||
protected Bindable<Country> Country => Header.Country;
|
protected Bindable<Country> Country => Header.Country;
|
||||||
|
|
||||||
|
private bool requiresRulesetRevert;
|
||||||
|
|
||||||
private APIRequest lastRequest;
|
private APIRequest lastRequest;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
@ -50,6 +52,25 @@ namespace osu.Game.Overlays
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void PopIn()
|
||||||
|
{
|
||||||
|
base.PopIn();
|
||||||
|
|
||||||
|
if (requiresRulesetRevert)
|
||||||
|
{
|
||||||
|
Ruleset.SetDefault();
|
||||||
|
requiresRulesetRevert = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopOutComplete()
|
||||||
|
{
|
||||||
|
base.PopOutComplete();
|
||||||
|
|
||||||
|
if (Header.Current.Value == default && Country.Value == null)
|
||||||
|
requiresRulesetRevert = true;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnTabChanged(RankingsScope tab)
|
protected override void OnTabChanged(RankingsScope tab)
|
||||||
{
|
{
|
||||||
// country filtering is only valid for performance scope.
|
// country filtering is only valid for performance scope.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user