in client/src/pages/photo-source/photo-source.ts [39:60]
onCaptureClick() {
this._profileService.loadProfile().then(
profile => {
if (!profile.language || !profile.endangeredLanguage) {
// no language chosen - let user change language
this.router.navigateByUrl(AppRoutes.ChangeLanguage);
} else {
// language chosen - show loading popup then navigate to capture image
const loadingPopUp = this.dialog.open(LoadingPopUpComponent,
{ closeOnNavigation: false, disableClose: true, panelClass: 'loading-popup' });
this.sessionService.currentSession.currentModal = loadingPopUp;
loadingPopUp.beforeClosed().subscribe({
complete: () => this.sessionService.currentSession.currentModal = null
});
addOpenedListener(loadingPopUp, () => this.router.navigateByUrl(AppRoutes.CaptureImage));
}
},
() => {
this.router.navigateByUrl(AppRoutes.ChangeLanguage);
}
);
}