diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-09-06 11:30:32 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-09-06 22:31:51 +0200 |
commit | 292e8998f3e7d106a91954e345a70f4cf3a317a8 (patch) | |
tree | 9ba04853ca3e3a883b29a34fdf461e6230439e01 /subprojects/frontend/src/xtext/XtextClient.ts | |
parent | refactor(frontend): toolbar sm breakpoint (diff) | |
download | refinery-292e8998f3e7d106a91954e345a70f4cf3a317a8.tar.gz refinery-292e8998f3e7d106a91954e345a70f4cf3a317a8.tar.zst refinery-292e8998f3e7d106a91954e345a70f4cf3a317a8.zip |
feat(frontend): handle page hide events
Integrate better with the page lifecycle state machine, see
https://developer.chrome.com/blog/page-lifecycle-api/
Also makes disconnected notifications less noisy, since they may occur
more frequently now (due to a frozen page being resumed).
Diffstat (limited to 'subprojects/frontend/src/xtext/XtextClient.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/XtextClient.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subprojects/frontend/src/xtext/XtextClient.ts b/subprojects/frontend/src/xtext/XtextClient.ts index c02afb3b..1f7e446f 100644 --- a/subprojects/frontend/src/xtext/XtextClient.ts +++ b/subprojects/frontend/src/xtext/XtextClient.ts | |||
@@ -47,6 +47,10 @@ export default class XtextClient { | |||
47 | this.occurrencesService = new OccurrencesService(store, this.updateService); | 47 | this.occurrencesService = new OccurrencesService(store, this.updateService); |
48 | } | 48 | } |
49 | 49 | ||
50 | start(): void { | ||
51 | this.webSocketClient.start(); | ||
52 | } | ||
53 | |||
50 | private onReconnect(): void { | 54 | private onReconnect(): void { |
51 | this.updateService.onReconnect(); | 55 | this.updateService.onReconnect(); |
52 | this.occurrencesService.onReconnect(); | 56 | this.occurrencesService.onReconnect(); |