forked from MapComplete/MapComplete
Fix back button; add title
This commit is contained in:
parent
6e77504854
commit
2f57010202
14 changed files with 115 additions and 43 deletions
19
Logic/Actors/HistoryHandling.ts
Normal file
19
Logic/Actors/HistoryHandling.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import {UIEventSource} from "../UIEventSource";
|
||||
import {UIElement} from "../../UI/UIElement";
|
||||
|
||||
export default class HistoryHandling {
|
||||
|
||||
constructor(hash: UIEventSource<string>, fullscreenMessage: UIEventSource<{ content: UIElement, hashText: string }>) {
|
||||
hash.addCallback(h => {
|
||||
if (h === undefined || h === "") {
|
||||
fullscreenMessage.setData(undefined);
|
||||
}
|
||||
})
|
||||
|
||||
fullscreenMessage.addCallback(fs => {
|
||||
hash.setData(fs?.hashText);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue