mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Merge master with conflicts resolved
This commit is contained in:
@ -12,6 +12,7 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
using System.Threading;
|
||||
using System.Linq;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Users;
|
||||
using System.Collections.Generic;
|
||||
using JetBrains.Annotations;
|
||||
@ -33,6 +34,7 @@ namespace osu.Game.Overlays.Comments
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
private GetCommentsRequest request;
|
||||
private ScheduledDelegate scheduledCommentsLoad;
|
||||
private CancellationTokenSource loadCancellation;
|
||||
private int currentPage;
|
||||
|
||||
@ -155,8 +157,9 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
request?.Cancel();
|
||||
loadCancellation?.Cancel();
|
||||
scheduledCommentsLoad?.Cancel();
|
||||
request = new GetCommentsRequest(id.Value, type.Value, Sort.Value, currentPage++, 0);
|
||||
request.Success += response => Schedule(() => OnSuccess(response));
|
||||
request.Success += res => scheduledCommentsLoad = Schedule(() => OnSuccess(res));
|
||||
api.PerformAsync(request);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user