private void MAdapterOnItemClick(object sender, LastActivitiesAdapterClickEventArgs e) { try { var position = e.Position; if (position >= 0) { var item = MAdapter.GetItem(position); if (item != null) { if (item.ActivityType == "following" || item.ActivityType == "friend") { WoWonderTools.OpenProfile(this, item.UserId, item.Activator); } else { var intent = new Intent(this, typeof(ViewFullPostActivity)); intent.PutExtra("Id", item.PostId); intent.PutExtra("DataItem", JsonConvert.SerializeObject(item.PostData)); StartActivity(intent); } } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void MAdapterOnItemClick(object sender, LastActivitiesAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { if (item.Type.Contains("liked__post") || item.Type.Contains("commented_on_post")) { if (item.PostData != null) { GlobalContext.OpenNewsFeedItem(item.PostData.Value.PostDataClass); } } else if (item.UserData != null) { AppTools.OpenProfile(Activity, item.UserId, item.UserData); } } } catch (Exception exception) { Console.WriteLine(exception); } }
//Event Click Item last Activities and Open ViewFullPostActivity Or Profile private void LastActivitiesAdapterOnItemClick(object sender, LastActivitiesAdapterClickEventArgs adapterClickEvents) { try { var position = adapterClickEvents.Position; if (position >= 0) { var item = MAdapter.GetItem(position); if (item != null) { if (item.ActivityType == "following" || item.ActivityType == "friend") { WoWonderTools.OpenProfile(Activity, item.UserId, item.Activator); } else { var intent = new Intent(Activity, typeof(ViewFullPostActivity)); intent.PutExtra("Id", item.PostId); //intent.PutExtra("DataItem", JsonConvert.SerializeObject(item.PostData)); Activity.StartActivity(intent); } } } } catch (Exception e) { Console.WriteLine(e); } }
private void MAdapterOnItemClick(object sender, LastActivitiesAdapterClickEventArgs e) { try { var position = e.Position; switch (position) { case >= 0: { var item = MAdapter.GetItem(position); if (item != null) { switch (item.ActivityType) { case "following": case "friend": WoWonderTools.OpenProfile(this, item.FollowId, item.FollowData); break; default: { var intent = new Intent(this, typeof(ViewFullPostActivity)); intent.PutExtra("Id", item.PostId); intent.PutExtra("DataItem", JsonConvert.SerializeObject(item.PostData)); StartActivity(intent); break; } } } break; } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Event Click Item last Activities and Open HyberdPostViewer_Activity >> Post private void LastActivitiesAdapter_OnItemClick(object sender, LastActivities_AdapterClickEventArgs adapterClickEvents) { try { var position = adapterClickEvents.Position; if (position >= 0) { var item = LastActivitiesAdapter.GetItem(position); if (item != null) { var Int = new Intent(Context, typeof(HyberdPostViewer_Activity)); Int.PutExtra("Id", item.PostId); Int.PutExtra("Type", "Post"); Int.PutExtra("Title", this.Context.GetString(Resource.String.Lbl_Post)); StartActivity(Int); } } } catch (Exception e) { Crashes.TrackError(e); } }