forked from MapComplete/MapComplete
UX: close 'welcome'-message when a point is selected via URL (and revive it when closed)
This commit is contained in:
parent
3e3127a3b5
commit
c70f249ca4
1 changed files with 12 additions and 0 deletions
|
@ -90,6 +90,18 @@ export class MenuState {
|
||||||
if (!visitedBefore.data && shouldShowWelcomeMessage) {
|
if (!visitedBefore.data && shouldShowWelcomeMessage) {
|
||||||
this.pageStates.about_theme.set(true)
|
this.pageStates.about_theme.set(true)
|
||||||
visitedBefore.set(true)
|
visitedBefore.set(true)
|
||||||
|
this._selectedElement.addCallbackD(() => {
|
||||||
|
if(this.pageStates.about_theme.data){
|
||||||
|
this.pageStates.about_theme.set(false)
|
||||||
|
this._selectedElement.addCallbackAndRun(selected => {
|
||||||
|
if(!selected){
|
||||||
|
this.pageStates.about_theme.set(true)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue