Commit 8611a1a1 authored by Phil Hughes's avatar Phil Hughes

Fix widget polling not respecting polling interval header

If the user sets the polling interval multiplier to 0 the widget
does not respect this. This changes that to make sure that
the widget respects the admin setting.
parent 325eb990
......@@ -352,6 +352,8 @@ export default {
return Promise.resolve();
},
initPolling() {
if (this.startingPollInterval <= 0) return;
this.pollingInterval = new SmartInterval({
callback: this.checkStatus,
startingInterval: this.startingPollInterval,
......@@ -435,10 +437,10 @@ export default {
notify.notifyMe(title, message, this.mr.gitlabLogo);
},
resumePolling() {
this.pollingInterval.resume();
this.pollingInterval?.resume();
},
stopPolling() {
this.pollingInterval.stopTimer();
this.pollingInterval?.stopTimer();
},
bindEventHubListeners() {
eventHub.$on('MRWidgetUpdateRequested', (cb) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment