aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Gustavo Sampaio <gbritosampaio@gmail.com>2017-10-20 08:29:46 -0300
committerLibravatar Gustavo Sampaio <gbritosampaio@gmail.com>2017-10-20 08:29:46 -0300
commit6624824fa90415ba5ee0f3272aa82a371566c5cf (patch)
tree5793f9fd7a94efc9e88ced181ee543b05b2db471 /src/stores/ServicesStore.js
parentAdd tab cycling with ctrl[+shift]+tab or ctrl+[pageup|pagedown] (diff)
downloadferdium-app-6624824fa90415ba5ee0f3272aa82a371566c5cf.tar.gz
ferdium-app-6624824fa90415ba5ee0f3272aa82a371566c5cf.tar.zst
ferdium-app-6624824fa90415ba5ee0f3272aa82a371566c5cf.zip
Bugfix: Ignore disabled services
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js8
1 files 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 {
209 } 209 }
210 210
211 @action _setActiveNext() { 211 @action _setActiveNext() {
212 const nextIndex = this._wrapIndex(this.all.findIndex(service => service.isActive), 1, this.all.length); 212 const nextIndex = this._wrapIndex(this.enabled.findIndex(service => service.isActive), 1, this.enabled.length);
213 213
214 this.all.forEach((s, index) => { 214 this.all.forEach((s, index) => {
215 this.all[index].isActive = false; 215 this.all[index].isActive = false;
216 }); 216 });
217 this.all[nextIndex].isActive = true; 217 this.enabled[nextIndex].isActive = true;
218 } 218 }
219 219
220 @action _setActivePrev() { 220 @action _setActivePrev() {
221 const prevIndex = this._wrapIndex(this.all.findIndex(service => service.isActive), -1, this.all.length); 221 const prevIndex = this._wrapIndex(this.enabled.findIndex(service => service.isActive), -1, this.enabled.length);
222 222
223 this.all.forEach((s, index) => { 223 this.all.forEach((s, index) => {
224 this.all[index].isActive = false; 224 this.all[index].isActive = false;
225 }); 225 });
226 this.all[prevIndex].isActive = true; 226 this.enabled[prevIndex].isActive = true;
227 } 227 }
228 228
229 @action _setUnreadMessageCount({ serviceId, count }) { 229 @action _setUnreadMessageCount({ serviceId, count }) {