summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/eventsource.sharedworker.js
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-02-19 10:05:35 +0000
committerGitHub <noreply@github.com>2021-02-19 11:05:35 +0100
commit092299891f07326f65b27e050c7aa8a9595b3445 (patch)
treedd2eb099539a3bf10d8151396116ba964314a56c /web_src/js/features/eventsource.sharedworker.js
parent430b3b780619bfcdcf0af209e0cba45caa32efbd (diff)
downloadgitea-092299891f07326f65b27e050c7aa8a9595b3445.tar.gz
gitea-092299891f07326f65b27e050c7aa8a9595b3445.zip
Move the stopwatches to the eventsource stream (#14588)
Move the stopwatches to the eventsource stream Use the /user/events eventsource to update the stopwatches instead of polling /api/v1/user/stopwatches if the eventsource is enabled. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'web_src/js/features/eventsource.sharedworker.js')
-rw-r--r--web_src/js/features/eventsource.sharedworker.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/web_src/js/features/eventsource.sharedworker.js b/web_src/js/features/eventsource.sharedworker.js
index bb4f628f6c..a94551e826 100644
--- a/web_src/js/features/eventsource.sharedworker.js
+++ b/web_src/js/features/eventsource.sharedworker.js
@@ -12,6 +12,7 @@ class Source {
this.listen('open');
this.listen('logout');
this.listen('notification-count');
+ this.listen('stopwatches');
this.listen('error');
}