Revert "Revert "feat(web): move emails notifications to one pane and enable opening settings via url (#1614)" (#1617)" (#1619)
This reverts commit 6824dd2d5f.
This commit is contained in:
@@ -29,9 +29,18 @@ export class PreferencesController {
|
||||
closePreferences = (): void => {
|
||||
this._open = false
|
||||
this.currentPane = DEFAULT_PANE
|
||||
this.removePreferencesToggleFromURLQueryParameters()
|
||||
}
|
||||
|
||||
get isOpen(): boolean {
|
||||
return this._open
|
||||
}
|
||||
|
||||
private removePreferencesToggleFromURLQueryParameters() {
|
||||
const urlSearchParams = new URLSearchParams(window.location.search)
|
||||
urlSearchParams.delete('settings')
|
||||
|
||||
const newUrl = `${window.location.origin}${window.location.pathname}${urlSearchParams.toString()}`
|
||||
window.history.replaceState(null, document.title, newUrl)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user