diff --git a/client/src/app/modal/quick-settings-modal.component.html b/client/src/app/modal/quick-settings-modal.component.html
index 7794e10c4..8fa3aee50 100644
--- a/client/src/app/modal/quick-settings-modal.component.html
+++ b/client/src/app/modal/quick-settings-modal.component.html
@@ -7,7 +7,7 @@
These settings apply only to your session on this instance.
-
Display settings
+
Display settings
- Video settings
+ Video settings
-
Interface settings
+
Interface settings
{
+ if (params['modal'] === QuickSettingsModalComponent.QUERY_MODAL_NAME) {
+ this.openedModal = this.modalService.open(this.modal, { centered: true })
+
+ this.openedModal.hidden.subscribe(() => this.setModalQuery('remove'))
+ }
+ })
}
isUserLoggedIn () {
@@ -52,11 +62,14 @@ export class QuickSettingsModalComponent extends FormReactive implements OnInit
}
show () {
- this.openedModal = this.modalService.open(this.modal, { centered: true })
+ this.setModalQuery('add')
}
- hide () {
- this.openedModal.close()
- this.form.reset()
+ private setModalQuery (type: 'add' | 'remove') {
+ const modal = type === 'add'
+ ? QuickSettingsModalComponent.QUERY_MODAL_NAME
+ : null
+
+ this.router.navigate([], { queryParams: { modal }, queryParamsHandling: 'merge' })
}
}