Beispiel #1
0
        private async Task RefreshChannelCounts()
        {
            if (BusyStart != null)
            {
                BusyStart();
            }

            foreach (var channel in Channels)
            {
                var ci = await _slackClient.GetChannel(channel.UniqueId);

                channel.Title = ci.unread_count > 0
                    ? "#{0} ({1})".FormatWith(ci.name, ci.unread_count)
                    : "#{0}".FormatWith(ci.name);
            }

            if (BusyStop != null)
            {
                BusyStop();
            }
        }