aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/TouchBar.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/TouchBar.js')
-rw-r--r--src/lib/TouchBar.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js
index 3397afdb2..c80931200 100644
--- a/src/lib/TouchBar.js
+++ b/src/lib/TouchBar.js
@@ -15,8 +15,8 @@ export default class FranzTouchBar {
15 if (isMac && semver.gt(osRelease, '16.6.0')) { 15 if (isMac && semver.gt(osRelease, '16.6.0')) {
16 this.build = autorun(this._build.bind(this)); 16 this.build = autorun(this._build.bind(this));
17 } 17 }
18 } catch (err) { 18 } catch (error) {
19 console.error(err); 19 console.error(error);
20 } 20 }
21 } 21 }
22 22
@@ -27,7 +27,7 @@ export default class FranzTouchBar {
27 const { TouchBarButton, TouchBarSpacer } = TouchBar; 27 const { TouchBarButton, TouchBarSpacer } = TouchBar;
28 28
29 const buttons = []; 29 const buttons = [];
30 this.stores.services.allDisplayed.forEach(((service) => { 30 for (const service of this.stores.services.allDisplayed) {
31 buttons.push(new TouchBarButton({ 31 buttons.push(new TouchBarButton({
32 label: `${service.name}${service.unreadDirectMessageCount > 0 32 label: `${service.name}${service.unreadDirectMessageCount > 0
33 ? ' 🔴' : ''} ${service.unreadDirectMessageCount === 0 33 ? ' 🔴' : ''} ${service.unreadDirectMessageCount === 0
@@ -38,7 +38,7 @@ export default class FranzTouchBar {
38 this.actions.service.setActive({ serviceId: service.id }); 38 this.actions.service.setActive({ serviceId: service.id });
39 }, 39 },
40 }), new TouchBarSpacer({ size: 'small' })); 40 }), new TouchBarSpacer({ size: 'small' }));
41 })); 41 }
42 42
43 const touchBar = new TouchBar({ items: buttons }); 43 const touchBar = new TouchBar({ items: buttons });
44 currentWindow.setTouchBar(touchBar); 44 currentWindow.setTouchBar(touchBar);