Beispiel #1
0
        private void MAdapterOnNotItemClick(object sender, HotOrNotUserAdapterClickEventArgs e)
        {
            try
            {
                var item = HotOrNotUserAdapter.GetItem(e.Position);
                if (item != null)
                {
                    if (Methods.CheckConnectivity())
                    {
                        PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                            () => RequestsAsync.Users.SetNotAsync(item.Id.ToString())
                        });

                        var index = HotOrNotUserAdapter.UsersDateList.IndexOf(item);
                        if (index != -1)
                        {
                            HotOrNotUserAdapter.UsersDateList.RemoveAt(index);
                            HotOrNotUserAdapter.NotifyItemRemoved(index);
                        }
                    }
                    else
                    {
                        Toast.MakeText(Activity, Activity.GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show();
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Beispiel #2
0
 //Open profile user  >> Hot Or NotL
 private void MAdapterOnImageItemClick(object sender, HotOrNotUserAdapterClickEventArgs e)
 {
     try
     {
         if (e.Position > -1)
         {
             var item = HotOrNotUserAdapter.GetItem(e.Position);
             if (item != null)
             {
                 QuickDateTools.OpenProfile(Activity, "Close", item, e.Image);
             }
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
 }