public NotificationCell() { InitializeComponent(); StatusView.HeaderView.GestureRecognizers.Clear(); StatusView.HeaderView.GestureRecognizers.Add(new TapGestureRecognizer() { Command = new Command(() => { var notification = BindingContext as DataNotification; DataUser performer = null; if (notification is DataNotification.Follow) { performer = (notification as DataNotification.Follow).Performer; } else if (notification is DataNotification.Retweet) { performer = (notification as DataNotification.Retweet).Performer; } else if (notification is DataNotification.RetweetedMention) { performer = (notification as DataNotification.RetweetedMention).Performer; } else if (notification is DataNotification.RetweetedRetweet) { performer = (notification as DataNotification.RetweetedRetweet).Performer; } else if (notification is DataNotification.Favorited) { performer = (notification as DataNotification.Favorited).Performer; } else if (notification is DataNotification.FavoritedMention) { performer = (notification as DataNotification.FavoritedMention).Performer; } else if (notification is DataNotification.FavoritedRetweet) { performer = (notification as DataNotification.FavoritedRetweet).Performer; } if (performer == null) { return; } App.Navigation.PushAsync(new UserDetailPage(performer, App.Tail.Account.GetAccountGroup(performer.Issuer[0]))); }) }); }
private void ShowIssuer(int inx, DataUser issuer) { if (inx == issuerImages.Count) { AddNewIssuer(); } var image = issuerImages[inx]; image.IsVisible = true; if (issuer == null) { return; } image.Source = issuer.ProfileHttpsImageURL; }
public UserMutePage(DataUser user) { InitializeComponent(); this.user = user; viewTarget.BindingContext = user; viewTarget.Update(); mute = App.Tail.Mute.GetUserMute(user); if (mute != null) { GoAwaySwitch.IsToggled = Target.MuteGoAway; TweetSwitch.IsToggled = Target.MuteTweet; RetweetSwitch.IsToggled = Target.MuteRetweet; OutboundMentionSwitch.IsToggled = Target.MuteOutboundMention; SingleInboundMentionSwitch.IsToggled = Target.MuteSingleInboundMention; MultipleInboundMentionSwitch.IsToggled = Target.MuteMultipleInboundMention; MultipleInboundMentionForcelySwitch.IsToggled = Target.MuteMultipleInboundMentionForcely; } }