diff options
Diffstat (limited to 'src/components/services/tabs/Tabbar.js')
-rw-r--r-- | src/components/services/tabs/Tabbar.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/components/services/tabs/Tabbar.js b/src/components/services/tabs/Tabbar.js index e8cd80e33..fd4325107 100644 --- a/src/components/services/tabs/Tabbar.js +++ b/src/components/services/tabs/Tabbar.js | |||
@@ -30,20 +30,28 @@ export default class TabBar extends Component { | |||
30 | reorder({ oldIndex, newIndex }); | 30 | reorder({ oldIndex, newIndex }); |
31 | }; | 31 | }; |
32 | 32 | ||
33 | disableService = ({ serviceId }) => { | 33 | toggleService = ({ serviceId, isEnabled }) => { |
34 | const { updateService } = this.props; | 34 | const { updateService } = this.props; |
35 | 35 | ||
36 | if (serviceId) { | 36 | if (serviceId) { |
37 | updateService({ | 37 | updateService({ |
38 | serviceId, | 38 | serviceId, |
39 | serviceData: { | 39 | serviceData: { |
40 | isEnabled: false, | 40 | isEnabled, |
41 | }, | 41 | }, |
42 | redirect: false, | 42 | redirect: false, |
43 | }); | 43 | }); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | disableService({ serviceId }) { | ||
48 | this.toggleService({ serviceId, isEnabled: false }); | ||
49 | } | ||
50 | |||
51 | enableService({ serviceId }) { | ||
52 | this.toggleService({ serviceId, isEnabled: true }); | ||
53 | } | ||
54 | |||
47 | render() { | 55 | render() { |
48 | const { | 56 | const { |
49 | services, | 57 | services, |
@@ -67,7 +75,8 @@ export default class TabBar extends Component { | |||
67 | toggleNotifications={toggleNotifications} | 75 | toggleNotifications={toggleNotifications} |
68 | toggleAudio={toggleAudio} | 76 | toggleAudio={toggleAudio} |
69 | deleteService={deleteService} | 77 | deleteService={deleteService} |
70 | disableService={this.disableService} | 78 | disableService={args => this.disableService(args)} |
79 | enableService={args => this.enableService(args)} | ||
71 | openSettings={openSettings} | 80 | openSettings={openSettings} |
72 | distance={20} | 81 | distance={20} |
73 | axis="y" | 82 | axis="y" |