mirror of https://github.com/ppy/osu
Rename method to suit better
This commit is contained in:
parent
5c640d15a0
commit
efd73ea9da
|
@ -33,11 +33,11 @@ protected NotificationsClient(IAPIProvider api)
|
|||
|
||||
public override Task ConnectAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
API.Queue(CreateFetchMessagesRequest(0));
|
||||
API.Queue(CreateInitialFetchRequest(0));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
protected APIRequest CreateFetchMessagesRequest(long? lastMessageId = null)
|
||||
protected APIRequest CreateInitialFetchRequest(long? lastMessageId = null)
|
||||
{
|
||||
var fetchReq = new GetUpdatesRequest(lastMessageId ?? this.lastMessageId);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public override Task ConnectAsync(CancellationToken cancellationToken)
|
|||
{
|
||||
while (!cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
await API.PerformAsync(CreateFetchMessagesRequest());
|
||||
await API.PerformAsync(CreateInitialFetchRequest());
|
||||
await Task.Delay(1000, cancellationToken);
|
||||
}
|
||||
}, cancellationToken);
|
||||
|
|
Loading…
Reference in New Issue