Example #1
0
 public void Handle(WallPostDeleted message)
 {
     foreach (IVirtualizable virtualizable in (Collection <IVirtualizable>) this.PostsVM.Collection)
     {
         WallPostItem wallPostItem = virtualizable as WallPostItem;
         if (wallPostItem != null && wallPostItem.WallPost.to_id == message.WallPost.to_id && wallPostItem.WallPost.id == message.WallPost.id)
         {
             this.PostsVM.Delete((IVirtualizable)wallPostItem);
             break;
         }
     }
 }
Example #2
0
 public void Handle(WallPostDeleted message)
 {
     using (IEnumerator <IVirtualizable> enumerator = ((Collection <IVirtualizable>) this.PostsVM.Collection).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             WallPostItem current = enumerator.Current as WallPostItem;
             if (current != null && current.WallPost.to_id == message.WallPost.to_id && current.WallPost.id == message.WallPost.id)
             {
                 this.PostsVM.Delete((IVirtualizable)current);
                 break;
             }
         }
     }
 }
Example #3
0
 public void Handle(WallPostDeleted message)
 {
     if (message.WallPost.owner_id != this._ownerId)
     {
         return;
     }
     if (message.WallPost.post_type == "suggest")
     {
         this.SuggestedPostsCount = this.SuggestedPostsCount - 1;
     }
     else
     {
         if (!message.WallPost.IsPostponed)
         {
             return;
         }
         this.PostponedPostsCount = this.PostponedPostsCount - 1;
     }
 }
Example #4
0
        public void Handle(WallPostDeleted message)
        {
            WallPostItem wallPostItem = Enumerable.FirstOrDefault <IVirtualizable>(this.WallVM.Collection, (IVirtualizable w) => w is WallPostItem && (w as WallPostItem).WallPost.to_id == message.WallPost.to_id && (w as WallPostItem).WallPost.id == message.WallPost.id) as WallPostItem;

            if (wallPostItem != null)
            {
                this.DeletedCallback(wallPostItem);
            }
            if (message.WallPost.post_type == "suggest")
            {
                this._group.SuggestedPostsCount--;
                this.ReadActionButtons();
                return;
            }
            if (message.WallPost.IsPostponed)
            {
                Group expr_87             = this._group;
                int   postponedPostsCount = expr_87.PostponedPostsCount;
                expr_87.PostponedPostsCount = postponedPostsCount - 1;
                this.ReadActionButtons();
            }
        }
 public void Handle(WallPostDeleted message)
 {
     this.RemoveIfApplicable(message.WallPost);
 }