Преглед изворни кода

fix one wrong working interval

Mike L пре 3 година
родитељ
комит
73ed826880
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      dist/twitter.js
  2. 1 1
      src/twitter.ts

+ 1 - 1
dist/twitter.js

@@ -303,7 +303,7 @@ class default_1 {
             if (this.workInterval < 1)
                 this.workInterval = 1;
             if (this.isInactiveTime || lock.feed.length === 0) {
-                setTimeout(this.work, this.workInterval * 1000);
+                setTimeout(this.work, this.workInterval * 1000 / lock.feed.length);
                 return;
             }
             lock.feed.forEach((feed, index) => {

+ 1 - 1
src/twitter.ts

@@ -483,7 +483,7 @@ export default class {
     const lock = this.lock;
     if (this.workInterval < 1) this.workInterval = 1;
     if (this.isInactiveTime || lock.feed.length === 0) {
-      setTimeout(this.work, this.workInterval * 1000);
+      setTimeout(this.work, this.workInterval * 1000 / lock.feed.length);
       return;
     }
     lock.feed.forEach((feed, index) => {