Merge branch 'master' into wiggle-repeat-points

This commit is contained in:
Fayne Aldan 2018-10-09 06:14:30 -06:00 committed by GitHub
commit 1e13bbe059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 16 deletions

View File

@ -291,7 +291,7 @@ private void initializeChannels()
messageRequest?.Cancel();
ListChannelsRequest req = new ListChannelsRequest();
req.Success += delegate (List<Channel> channels)
req.Success += delegate(List<Channel> channels)
{
AvailableChannels = channels;
@ -323,10 +323,7 @@ private void initializeChannels()
protected Channel CurrentChannel
{
get
{
return currentChannel;
}
get { return currentChannel; }
set
{
@ -445,13 +442,7 @@ private void fetchUpdates()
if (updates?.Presence != null)
{
foreach (var channel in updates.Presence)
{
if (careChannels.Find(c => c.Id == channel.Id) == null)
{
channel.Joined.Value = true;
addChannel(channel);
}
}
addChannel(AvailableChannels.Find(c => c.Id == channel.Id));
foreach (var group in updates.Messages.GroupBy(m => m.ChannelId))
careChannels.Find(c => c.Id == group.Key)?.AddNewMessages(group.ToArray());
@ -462,10 +453,7 @@ private void fetchUpdates()
fetchReq = null;
};
fetchReq.Failure += delegate
{
fetchReq = null;
};
fetchReq.Failure += delegate { fetchReq = null; };
api.Queue(fetchReq);
}