public EzFollowResult( FollowResult result ) { if (result.item != null) { Item = new EzFollowUser(result.item); } }
public FollowResult UnFollow(FollowInput input) { var result = new FollowResult(); _departmentProfileService.UnFollowDepartment(input.UserId, input.Id); result.Successful = true; return(result); }
public void LoadFollowingChannels(string p_channelname) { List <IChannel> result = new List <IChannel>(); string uri = String.Format(GET_FOLLOWING_CHANNEL, p_channelname); FollowResult followResult = ModelFactory.GetFollowResult(Utility.GetJson(uri)); foreach (Follow follow in followResult.follows) { IChannel ichannel = GetIChannel(follow.channel); ChannelList.Add(ichannel); } }
public FollowResult Follow(FollowInput input) { var result = new FollowResult(); var follow = _departmentProfileService.FollowDepartment(input.UserId, input.Id, input.Code); if (follow != null) { result.Successful = true; } else { result.Successful = false; result.Message = "Could not follow department. It's either Disabled, Missing or you supplied the incorrect code."; } return(result); }
private async void ExecuteFollowUserCommand(string userid) { FollowUser follower = FollowerUsers.FirstOrDefault(x => x.Id == userid); FollowUser following = FollowingUsers.FirstOrDefault(x => x.Id == userid); if (follower?.IsFollowing == true || following?.IsFollowing == true) { UserContentProvider user = new UserContentProvider(); FollowResult result = await user.UnFollowUser(userid, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken); if (result.Error == null || result.Error.Count == 0) { if (follower != null) { follower.IsFollowing = false; } if (following != null) { following.IsFollowing = false; } } } else { UserContentProvider user = new UserContentProvider(); FollowResult result = await user.FollowUser(userid, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken); if (result.Error == null || result.Error.Count == 0) { if (follower != null) { follower.IsFollowing = true; } if (following != null) { following.IsFollowing = true; } } } }