Merge master with conflicts resolved

This commit is contained in:
Andrei Zavatski
2020-07-12 02:20:54 +03:00
1340 changed files with 41715 additions and 14298 deletions

View File

@ -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);
}