public async void UpdateViewers()
        {
            lock (viewers)
            {
                viewers.Clear();
            }

            var mods = await TwitchViewerService.GetMods();

            modCount = mods.Count;

            viewers = mods;
            viewers.AddRange(await TwitchViewerService.GetViewers());

            activity.RunOnUiThread(() => {
                NotifyDataSetChanged();
                AndHUD.Shared.Dismiss(activity);
            });

            sectionIndices = GetSectionIndices();
        }
示例#2
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();

            BTProgressHUD.ForceiOS6LookAndFeel = true;
            BTProgressHUD.Show("Loading viewers...");

            Viewers = await TwitchViewerService.GetViewers();

            Mods = await TwitchViewerService.GetMods();

            ViewerCount = await TwitchViewerService.GetViewerCount();

            //TwitchViewerService.TestFollowersMethod ();

            if (ViewerCount.HasValue)
            {
                this.Title = $"Twitch Viewers - {ViewerCount.Value} online";
            }

            this.TableView.ReloadData();

            BTProgressHUD.Dismiss();
        }