summaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 7300a76c8..c38d0d9ee 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -187,13 +187,13 @@ export default class ServicesStore extends Store {
187 187
188 // patch custom icon deletion 188 // patch custom icon deletion
189 if (data.customIcon === 'delete') { 189 if (data.customIcon === 'delete') {
190 data.iconUrl = ''; 190 newData.iconUrl = '';
191 data.hasCustomUploadedIcon = false; 191 newData.hasCustomUploadedIcon = false;
192 } 192 }
193 193
194 // patch custom icon url 194 // patch custom icon url
195 if (data.customIconUrl) { 195 if (data.customIconUrl) {
196 data.iconUrl = data.customIconUrl; 196 newData.iconUrl = data.customIconUrl;
197 } 197 }
198 198
199 Object.assign(result.find(c => c.id === serviceId), newData); 199 Object.assign(result.find(c => c.id === serviceId), newData);
@@ -536,7 +536,6 @@ export default class ServicesStore extends Store {
536 536
537 // We can't just block this earlier, otherwise the mobx reaction won't be aware of the vars to watch in some cases 537 // We can't just block this earlier, otherwise the mobx reaction won't be aware of the vars to watch in some cases
538 if (showMessageBadgesEvenWhenMuted) { 538 if (showMessageBadgesEvenWhenMuted) {
539 console.log('set badge', unreadDirectMessageCount, unreadIndirectMessageCount);
540 this.actions.app.setBadge({ 539 this.actions.app.setBadge({
541 unreadDirectMessageCount, 540 unreadDirectMessageCount,
542 unreadIndirectMessageCount, 541 unreadIndirectMessageCount,
@@ -589,12 +588,16 @@ export default class ServicesStore extends Store {
589 const delay = 1000; 588 const delay = 1000;
590 589
591 if (service) { 590 if (service) {
591 if (service.timer !== null) {
592 clearTimeout(service.timer);
593 }
594
592 const loop = () => { 595 const loop = () => {
593 if (!service.webview) return; 596 if (!service.webview) return;
594 597
595 service.webview.send('poll'); 598 service.webview.send('poll');
596 599
597 setTimeout(loop, delay); 600 service.timer = setTimeout(loop, delay);
598 }; 601 };
599 602
600 loop(); 603 loop();