private void NearByAdapter_OnItemClick(object sender, NearByAdapterClickEventArgs adapterClickEvents) { try { var position = adapterClickEvents.Position; if (position >= 0) { var item = NearByAdapter.GetItem(position); if (item != null) { Intent Int; if (item.user_id != UserDetails.User_id) { Int = new Intent(this, typeof(User_Profile_Activity)); Int.PutExtra("UserId", item.user_id); Int.PutExtra("UserType", "NearBy"); Int.PutExtra("UserItem", JsonConvert.SerializeObject(item)); } else { Int = new Intent(this, typeof(MyProfile_Activity)); Int.PutExtra("UserId", item.user_id); } StartActivity(Int); } } } catch (Exception e) { Crashes.TrackError(e); } }
private void OnFollowButtonItemClick(object sender, NearByAdapterClickEventArgs e) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(this, GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short)?.Show(); } else { if (e.Position > -1) { UserDataObject item = MAdapter.GetItem(e.Position); if (item != null) { WoWonderTools.SetAddFriend(this, item, e.BtnAddUser); } } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void MAdapterOnItemClick(object sender, NearByAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { WoWonderTools.OpenProfile(this, item.UserId, item); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void MAdapterOnItemClick(object sender, NearByAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { WoWonderTools.OpenProfile(this, item.UserId, item); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Add Like >> Near By private void MAdapterOnUsersLikeButtonItemClick(object sender, NearByAdapterClickEventArgs e) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(Activity, Activity.GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); return; } if (e.Position <= -1) { return; } var item = MAdapter.GetItem(e.Position); if (item != null) { if (item.UsersData.IsLiked != null && item.UsersData.IsLiked.Value) { item.UsersData.IsLiked = false; //sent api PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.Users.DeleteLikesAsync(item.UsersData.Id.ToString()) }); } else { item.UsersData.IsLiked = true; //sent api PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.Users.AddLikesAsync(item.UsersData.Id.ToString(), "") }); } MAdapter.NotifyItemChanged(e.Position); } } catch (Exception exception) { Console.WriteLine(exception); } }
//Open profile user >> Near By private void MAdapterOnUsersItemClick(object sender, NearByAdapterClickEventArgs e) { try { if (e.Position <= -1) { return; } var item = MAdapter.GetItem(e.Position); if (item != null) { QuickDateTools.OpenProfile(Activity, "LikeAndMoveTrending", item.UsersData, e.Image); } } catch (Exception exception) { Console.WriteLine(exception); } }