Exemplo n.º 1
0
 public NotificationPage(NotificationViewModel vm)
 {
     InitializeComponent();
     DataContext = vm;
     this.vm = vm;
     composite = new LivetCompositeDisposable();
     ctxlistener = new PropertyChangedWeakEventListener((INotifyPropertyChanged)DataContext);
 }
Exemplo n.º 2
0
        public void OnStatusUpdate(object sender, PropertyChangedEventArgs e)
        {
            var st = kbtter.LatestStatus.Status;

            TimelineStatuses.Insert(0, StatusViewModelExtension.CreateStatusViewModel(this, st));
            RaisePropertyChanged("StatusUpdate");
            if (st.RetweetedStatus != null)
            {
                if (st.RetweetedStatus.User.Id != kbtter.AuthenticatedUser.Id)
                {
                    return;
                }
                var vm = new NotificationViewModel(st);
                TimelineNotifications.Insert(0, vm);
                //if (EventUpdate != null) EventUpdate(this, vm);
                return;
            }
            if (st.Entities != null && st.Entities.UserMentions.Count(p => p.ScreenName == kbtter.AuthenticatedUser.ScreenName) != 0)
            {
                var vm = new NotificationViewModel(st, this);
                TimelineNotifications.Insert(0, vm);
                //if (EventUpdate != null) EventUpdate(this, vm);
            }
        }