Example #1
0
 private void Unlike()
 {
     LikesService.Current.AddRemoveLike(false, this.OwnerId, this.ItemId, LikeObjectType.market, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res =>
     {
         EventAggregator current = EventAggregator.Current;
         ProductFavedUnfavedEvent favedUnfavedEvent = new ProductFavedUnfavedEvent();
         favedUnfavedEvent.Product = this._product;
         int num = 0;
         favedUnfavedEvent.IsFaved = num != 0;
         current.Publish((object)favedUnfavedEvent);
     }), "");
     --this._likesCommentsData.likesAllCount;
     this._likesCommentsData.UserLiked = 0;
 }
        private void Unlike()
        {
            LikesService.Current.AddRemoveLike(false, this.OwnerId, this.ItemId, LikeObjectType.market, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res =>
            {
                EventAggregator current = EventAggregator.Current;
                ProductFavedUnfavedEvent favedUnfavedEvent = new ProductFavedUnfavedEvent();
                favedUnfavedEvent.Product = this._product;
                int num = 0;
                favedUnfavedEvent.IsFaved = num != 0;
                current.Publish(favedUnfavedEvent);
            }), "");
            ProductLikesCommentsData likesCommentsData = this._likesCommentsData;
            int?likesAllCount = likesCommentsData.likesAllCount;
            int?nullable      = likesAllCount.HasValue ? new int?(likesAllCount.GetValueOrDefault() - 1) : new int?();

            likesCommentsData.likesAllCount   = nullable;
            this._likesCommentsData.UserLiked = 0;
        }
Example #3
0
 public void Handle(ProductFavedUnfavedEvent message)
 {
     this.ReloadProducts(true);
 }