diff options
-rw-r--r-- | src/stores/ServicesStore.js | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index a34390d88..16deb91c5 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -587,7 +587,10 @@ export default class ServicesStore extends Store { | |||
587 | const service = this.one(serviceId); | 587 | const service = this.one(serviceId); |
588 | 588 | ||
589 | for (const s of this.all) { | 589 | for (const s of this.all) { |
590 | s.isActive = false; | 590 | if (s.isActive) { |
591 | s.lastUsed = Date.now(); | ||
592 | s.isActive = false; | ||
593 | } | ||
591 | } | 594 | } |
592 | service.isActive = true; | 595 | service.isActive = true; |
593 | this._awake({ serviceId: service.id }); | 596 | this._awake({ serviceId: service.id }); |
@@ -624,12 +627,7 @@ export default class ServicesStore extends Store { | |||
624 | this.allDisplayed.length, | 627 | this.allDisplayed.length, |
625 | ); | 628 | ); |
626 | 629 | ||
627 | for (const s of this.all) { | 630 | this._setActive({ serviceId: this.allDisplayed[nextIndex].id }); |
628 | s.isActive = false; | ||
629 | } | ||
630 | this.allDisplayed[nextIndex].isActive = true; | ||
631 | |||
632 | this._focusActiveService(); | ||
633 | } | 631 | } |
634 | 632 | ||
635 | @action _setActivePrev() { | 633 | @action _setActivePrev() { |
@@ -639,12 +637,7 @@ export default class ServicesStore extends Store { | |||
639 | this.allDisplayed.length, | 637 | this.allDisplayed.length, |
640 | ); | 638 | ); |
641 | 639 | ||
642 | for (const s of this.all) { | 640 | this._setActive({ serviceId: this.allDisplayed[prevIndex].id }); |
643 | s.isActive = false; | ||
644 | } | ||
645 | this.allDisplayed[prevIndex].isActive = true; | ||
646 | |||
647 | this._focusActiveService(); | ||
648 | } | 641 | } |
649 | 642 | ||
650 | @action _setUnreadMessageCount({ serviceId, count }) { | 643 | @action _setUnreadMessageCount({ serviceId, count }) { |