mirror of
https://github.com/osukey/osukey.git
synced 2025-05-11 16:47:19 +09:00
Reorder file and change naming slightly
This commit is contained in:
parent
5e09a1b334
commit
fa3373e5f3
@ -36,6 +36,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
|
|
||||||
private BeatmapListingPager beatmapListingPager;
|
private BeatmapListingPager beatmapListingPager;
|
||||||
|
|
||||||
|
private ScheduledDelegate queryChangedDebounce;
|
||||||
|
private ScheduledDelegate queryPagingDebounce;
|
||||||
|
|
||||||
public BeatmapListingFilterControl()
|
public BeatmapListingFilterControl()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
@ -113,8 +116,17 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
sortDirection.BindValueChanged(_ => queueUpdateSearch());
|
sortDirection.BindValueChanged(_ => queueUpdateSearch());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate queryChangedDebounce;
|
public void TakeFocus() => searchControl.TakeFocus();
|
||||||
private ScheduledDelegate queryPagingDebounce;
|
|
||||||
|
public void ShowMore()
|
||||||
|
{
|
||||||
|
if (beatmapListingPager == null || !beatmapListingPager.CanFetchNextPage)
|
||||||
|
return;
|
||||||
|
if (queryPagingDebounce != null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
beatmapListingPager.FetchNextPage();
|
||||||
|
}
|
||||||
|
|
||||||
private void queueUpdateSearch(bool queryTextChanged = false)
|
private void queueUpdateSearch(bool queryTextChanged = false)
|
||||||
{
|
{
|
||||||
@ -142,7 +154,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
queryPagingDebounce = null;
|
queryPagingDebounce = null;
|
||||||
beatmapListingPager.PageFetched += onSearchFinished;
|
beatmapListingPager.PageFetched += onSearchFinished;
|
||||||
|
|
||||||
AddPageToResult();
|
ShowMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onSearchFinished(List<BeatmapSetInfo> beatmaps)
|
private void onSearchFinished(List<BeatmapSetInfo> beatmaps)
|
||||||
@ -165,17 +177,5 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
|
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TakeFocus() => searchControl.TakeFocus();
|
|
||||||
|
|
||||||
public void AddPageToResult()
|
|
||||||
{
|
|
||||||
if (beatmapListingPager == null || !beatmapListingPager.CanFetchNextPage)
|
|
||||||
return;
|
|
||||||
if (queryPagingDebounce != null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
beatmapListingPager.FetchNextPage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ namespace osu.Game.Overlays
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (shouldAddNextPage)
|
if (shouldAddNextPage)
|
||||||
filterControl.AddPageToResult();
|
filterControl.ShowMore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user