From 6624824fa90415ba5ee0f3272aa82a371566c5cf Mon Sep 17 00:00:00 2001 From: Gustavo Sampaio Date: Fri, 20 Oct 2017 08:29:46 -0300 Subject: Bugfix: Ignore disabled services --- src/stores/ServicesStore.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 823540076..19db05494 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -209,21 +209,21 @@ export default class ServicesStore extends Store { } @action _setActiveNext() { - const nextIndex = this._wrapIndex(this.all.findIndex(service => service.isActive), 1, this.all.length); + const nextIndex = this._wrapIndex(this.enabled.findIndex(service => service.isActive), 1, this.enabled.length); this.all.forEach((s, index) => { this.all[index].isActive = false; }); - this.all[nextIndex].isActive = true; + this.enabled[nextIndex].isActive = true; } @action _setActivePrev() { - const prevIndex = this._wrapIndex(this.all.findIndex(service => service.isActive), -1, this.all.length); + const prevIndex = this._wrapIndex(this.enabled.findIndex(service => service.isActive), -1, this.enabled.length); this.all.forEach((s, index) => { this.all[index].isActive = false; }); - this.all[prevIndex].isActive = true; + this.enabled[prevIndex].isActive = true; } @action _setUnreadMessageCount({ serviceId, count }) { -- cgit v1.2.3-70-g09d2