Beispiel #1
0
        private void UpdateImpl(ProgressDialog progressDialog)
        {
            // Check if we have a valid _gcstuffs
            if (_gcstuffs != null)
            {
                // Check if account is valid
                if (_gcstuffs.CheckGCAccount(_login, _password, false, this))
                {
                    // Retrieve list of notifications from GC.com
                    _notifs = _gcstuffs.ListNotifications();

                    // Pass these notifications to the adapter
                    //_fa.DisplayedNotifs = _notifs;
                    // Notify adapter that notifications changed to trigger refresh
                    //RunOnUiThread(() => _fa.NotifyDataSetChanged());

                    // Now we sort if needed
                    RunOnUiThread(() => PerformSort());

                    // Kill progressdialog (we are in UI thread already, good)
                    RunOnUiThread(() => progressDialog.Hide());
                }
                else
                {
                    // Kill progressdialog (we are in UI thread already, good)
                    RunOnUiThread(() => progressDialog.Hide());

                    // Crap, no valid account information, we launch the configure activity
                    RunOnUiThread(() => Toast.MakeText(this, this.Resources.GetString(Resource.String.AccountConfigure), ToastLength.Short).Show());
                    Configure();
                }
            }
        }