mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Resolve remaining InspectCode issues
> CI should now pass build test
This commit is contained in:
parent
1ac9c7c15a
commit
43450b5485
@ -6,11 +6,13 @@ using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace osu.Game.Extensions
|
||||
{
|
||||
public class Cursor
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, JToken> Properties;
|
||||
}
|
||||
|
@ -11,15 +11,15 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class SearchBeatmapSetsRequest : APIRequest<SearchBeatmapSetsResponse>
|
||||
{
|
||||
public SearchCategory SearchCategory { get; set; }
|
||||
public SearchCategory SearchCategory { get; }
|
||||
|
||||
public SortCriteria SortCriteria { get; set; }
|
||||
public SortCriteria SortCriteria { get; }
|
||||
|
||||
public SortDirection SortDirection { get; set; }
|
||||
public SortDirection SortDirection { get; }
|
||||
|
||||
public SearchGenre Genre { get; set; }
|
||||
public SearchGenre Genre { get; }
|
||||
|
||||
public SearchLanguage Language { get; set; }
|
||||
public SearchLanguage Language { get; }
|
||||
|
||||
private readonly string query;
|
||||
private readonly RulesetInfo ruleset;
|
||||
@ -27,8 +27,7 @@ namespace osu.Game.Online.API.Requests
|
||||
|
||||
private string directionString => SortDirection == SortDirection.Descending ? @"desc" : @"asc";
|
||||
|
||||
public SearchBeatmapSetsRequest(string query, RulesetInfo ruleset, Cursor cursor = null,
|
||||
SearchCategory searchCategory = SearchCategory.Any, SortCriteria sortCriteria = SortCriteria.Ranked, SortDirection sortDirection = SortDirection.Descending)
|
||||
public SearchBeatmapSetsRequest(string query, RulesetInfo ruleset, Cursor cursor = null, SearchCategory searchCategory = SearchCategory.Any, SortCriteria sortCriteria = SortCriteria.Ranked, SortDirection sortDirection = SortDirection.Descending)
|
||||
{
|
||||
this.query = string.IsNullOrEmpty(query) ? string.Empty : System.Uri.EscapeDataString(query);
|
||||
this.ruleset = ruleset;
|
||||
|
@ -24,9 +24,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
private SearchBeatmapSetsRequest getSetsRequest;
|
||||
private SearchBeatmapSetsResponse lastResponse;
|
||||
|
||||
private bool isLastPageFetched = false;
|
||||
private bool isLastPageFetched;
|
||||
private bool isFetching => getSetsRequest != null;
|
||||
public bool IsPastFirstPage { get; private set; } = false;
|
||||
public bool IsPastFirstPage { get; private set; }
|
||||
public bool CanFetchNextPage => !isLastPageFetched && !isFetching;
|
||||
|
||||
public BeatmapListingPager(IAPIProvider api, RulesetStore rulesets, string query, RulesetInfo ruleset, SearchCategory searchCategory = SearchCategory.Any, SortCriteria sortCriteria = SortCriteria.Ranked, SortDirection sortDirection = SortDirection.Descending)
|
||||
|
@ -184,8 +184,7 @@ namespace osu.Game.Overlays
|
||||
// If the auto-size computation is delayed until fade out completes, the background remain high for too long making the resulting transition to the smaller height look weird.
|
||||
// At the same time, if the last content's height is bypassed immediately, there is a period where the new content is at Alpha = 0 when the auto-sized height will be 0.
|
||||
// To resolve both of these issues, the bypass is delayed until a point when the content transitions (fade-in and fade-out) overlap and it looks good to do so.
|
||||
lastContent.Delay(25).Schedule(() => lastContent.BypassAutoSizeAxes = Axes.Y)
|
||||
.Then().Schedule(() => panelTarget.Remove(lastContent));
|
||||
lastContent.Delay(25).Schedule(() => lastContent.BypassAutoSizeAxes = Axes.Y).Then().Schedule(() => panelTarget.Remove(lastContent));
|
||||
}
|
||||
|
||||
if (!content.IsAlive)
|
||||
|
Loading…
Reference in New Issue
Block a user