aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services/tabs/Tabbar.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-10 15:40:01 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-11-10 15:40:01 +0100
commitf39e31af92f3ae6689697685d008f0487a5be351 (patch)
treec00654dbb28817cbfdca8223c1f86d38c706e163 /src/components/services/tabs/Tabbar.js
parentfeat(App): Respect System DoNotDisturb mode for service audio (diff)
parentMerge pull request #248 from meetfranz/feature/192-display-disabled-services (diff)
downloadferdium-app-f39e31af92f3ae6689697685d008f0487a5be351.tar.gz
ferdium-app-f39e31af92f3ae6689697685d008f0487a5be351.tar.zst
ferdium-app-f39e31af92f3ae6689697685d008f0487a5be351.zip
Merge branch 'develop' into feature/mute-service
# Conflicts: # src/components/services/content/ServiceWebview.js # src/components/services/content/Services.js # src/components/services/tabs/TabItem.js # src/containers/layout/AppLayoutContainer.js
Diffstat (limited to 'src/components/services/tabs/Tabbar.js')
-rw-r--r--src/components/services/tabs/Tabbar.js15
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"