aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 17150a023..d63302fce 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -518,7 +518,16 @@ export default class ServicesStore extends Store {
518 this.actions.ui.toggleServiceUpdatedInfoBar({ visible: false }); 518 this.actions.ui.toggleServiceUpdatedInfoBar({ visible: false });
519 } 519 }
520 520
521 @action _reorder({ oldIndex, newIndex }) { 521 @action _reorder(params) {
522 const { workspaces } = this.stores;
523 if (workspaces.isAnyWorkspaceActive) {
524 workspaces.reorderServicesOfActiveWorkspace(params);
525 } else {
526 this._reorderService(params);
527 }
528 }
529
530 @action _reorderService({ oldIndex, newIndex }) {
522 const showDisabledServices = this.stores.settings.all.app.showDisabledServices; 531 const showDisabledServices = this.stores.settings.all.app.showDisabledServices;
523 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]); 532 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]);
524 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]); 533 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]);