protected override async void OnAppearing() { base.OnAppearing(); ProfileModel profile = await profileApi.GetAsync(authController.AuthToken.UserId); if (string.IsNullOrEmpty(profile.Firstname)) { // If firstname is empty then profile has not been edited, because it is a required field ProfileEditPage profilePage = new ProfileEditPage(Container, authController.AuthToken.UserId); await Navigation.PushAsync(profilePage); } }
async void EditProfileAsync(object sender, EventArgs e) { ProfileEditPage profilePage = new ProfileEditPage(Container, authController.AuthToken.UserId); await Navigation.PushAsync(profilePage); }