private bool onFindUserSent(FriendsServiceEvents.FindUserSent evt) { eventChannel.RemoveListener <FriendsServiceEvents.FindUserSent>(onFindUserSent); if (evt.Success) { onFindUserSuccess(); } else { onFindUserFailed(); } return(false); }
private bool onFindUserResponse(FriendsServiceEvents.FindUserSent evt) { Service.Get <EventDispatcher>().RemoveListener <FriendsServiceEvents.FindUserSent>(onFindUserResponse); string message = "other"; if (evt.Success) { DataEntityHandle entityByType = Service.Get <CPDataEntityCollection>().GetEntityByType <SearchedUserData>(); FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(entityByType); if (friendStatus == FriendStatus.Friend) { message = "friend"; } } Service.Get <ICPSwrveService>().StartTimer("igloo", "visit", message); return(false); }
private bool onFindUserSent(FriendsServiceEvents.FindUserSent evt) { Service.Get <EventDispatcher>().RemoveListener <FriendsServiceEvents.FindUserSent>(onFindUserSent); MessageContainer.SetActive(value: true); Preloader.SetActive(value: false); if (evt.Success) { DataEntityHandle entityByType = Service.Get <CPDataEntityCollection>().GetEntityByType <SearchedUserData>(); OpenPlayerCardCommand openPlayerCardCommand = new OpenPlayerCardCommand(entityByType); openPlayerCardCommand.Execute(); setMessageText("Friends.AddFriends.HeaderText"); } else { setMessageText("Friends.AddFriends.NotFoundText"); } return(false); }
private bool onFindUserSent(FriendsServiceEvents.FindUserSent evt) { isFindUserSuccessful = evt.Success; return(false); }