Exemplo n.º 1
0
        public void FaveUnfave()
        {
            bool add = !this.IsFavorite;

            FavoritesService.Instance.FaveAddRemoveGroup(this._gid, add, (Action <BackendResult <ResponseWithId, ResultCode> >)(res =>
            {
                GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, add ? CommonResources.Bookmarks_CommunityIsAdded : CommonResources.Bookmarks_CommunityIsRemoved, (VKRequestsDispatcher.Error)null);
                if (res.ResultCode != ResultCode.Succeeded || this._group == null)
                {
                    return;
                }
                this._group.IsFavorite = !this._group.IsFavorite;
                this.NotifyPropertyChanged <bool>((() => this.IsFavorite));
                EventAggregator current = EventAggregator.Current;
                GroupFavedUnfavedEvent favedUnfavedEvent = new GroupFavedUnfavedEvent();
                favedUnfavedEvent.group = this._group;
                int num = this.IsFavorite ? 1 : 0;
                favedUnfavedEvent.IsFaved = num != 0;
                current.Publish(favedUnfavedEvent);
            }));
        }
Exemplo n.º 2
0
 public void Handle(GroupFavedUnfavedEvent message)
 {
     this._linksVM.LoadData(true, true, null, false);
 }
Exemplo n.º 3
0
 public void Handle(GroupFavedUnfavedEvent message)
 {
     this._linksVM.LoadData(true, true, (Action <BackendResult <List <Link>, ResultCode> >)null, false);
 }