From 43450b54853712698da7909e31568a5ecd6b4566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=80=8C=E7=A9=BA=E7=99=BD=E3=80=8D?= <「空白」> Date: Thu, 14 May 2020 01:57:03 +0900 Subject: [PATCH] Resolve remaining InspectCode issues > CI should now pass build test --- osu.Game/Extensions/WebRequestExtensions.cs | 2 ++ .../Online/API/Requests/SearchBeatmapSetsRequest.cs | 13 ++++++------- .../Overlays/BeatmapListing/BeatmapListingPager.cs | 4 ++-- osu.Game/Overlays/BeatmapListingOverlay.cs | 3 +-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/osu.Game/Extensions/WebRequestExtensions.cs b/osu.Game/Extensions/WebRequestExtensions.cs index f92f707d30..80c8b147bf 100644 --- a/osu.Game/Extensions/WebRequestExtensions.cs +++ b/osu.Game/Extensions/WebRequestExtensions.cs @@ -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 Properties; } diff --git a/osu.Game/Online/API/Requests/SearchBeatmapSetsRequest.cs b/osu.Game/Online/API/Requests/SearchBeatmapSetsRequest.cs index a49cb70c37..0c3272c7de 100644 --- a/osu.Game/Online/API/Requests/SearchBeatmapSetsRequest.cs +++ b/osu.Game/Online/API/Requests/SearchBeatmapSetsRequest.cs @@ -11,15 +11,15 @@ namespace osu.Game.Online.API.Requests { public class SearchBeatmapSetsRequest : APIRequest { - 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; diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapListingPager.cs b/osu.Game/Overlays/BeatmapListing/BeatmapListingPager.cs index 4c8902d314..f55e37ebc7 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapListingPager.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapListingPager.cs @@ -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) diff --git a/osu.Game/Overlays/BeatmapListingOverlay.cs b/osu.Game/Overlays/BeatmapListingOverlay.cs index ba92181ac5..e26f084ea4 100644 --- a/osu.Game/Overlays/BeatmapListingOverlay.cs +++ b/osu.Game/Overlays/BeatmapListingOverlay.cs @@ -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)