protected async override void OnAppearing()
        {
            base.OnAppearing();

            //Establish relationship with team
            userStatus = await TeamsFirestore.GetRelationshipAsync(UsersFirestore.myProfile.Id, teamDetailsPageViewModel.Team);

            InfoFrame.IsVisible  = true;
            InfoButton.IsEnabled = false;

            switch (userStatus)
            {
            case (sbyte)relationshipType.isInside:
                joinTeamButton.Text = "Leave Team";
                break;

            case (sbyte)relationshipType.isRequesting:
                joinTeamButton.Text = "✔️ Requested";
                break;

            case (sbyte)relationshipType.isOutside:
                joinTeamButton.Text = "Join Team";
                break;
            }
        }
Beispiel #2
0
        public async Task Test6_GetRelationship()
        {
            //Arrange
            string user_id = "mTwtRUKrzfamBp6PUEMGPMCRNBy1";
            string team_id = "Xu3FwHcyJpeDuXIk1vti";
            var    team    = await TeamsFirestore.GetTeamByIdAsync(team_id);

            //Act
            var relationship = await TeamsFirestore.GetRelationshipAsync(user_id, team);

            //Assert
            Assert.True(relationship.Equals(relationshipType.isRequesting));
        }