From 7dd2fa618627efb4e5218538065800a7eb7bba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ABck=20V=C3=A9zien?= Date: Thu, 12 Apr 2018 12:28:58 +0200 Subject: [PATCH] Fix touch-bar-init --- src/components/layout/Default.js | 10 +++++++++- src/index.ejs | 6 +----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/layout/Default.js b/src/components/layout/Default.js index 59020cc7..715f6cbf 100644 --- a/src/components/layout/Default.js +++ b/src/components/layout/Default.js @@ -35,7 +35,15 @@ type Props = { class Default extends Component { componentDidMount() { - window.requestAnimationFrame(() => (this._timeout = setTimeout(() => window.onAppReady(), 300))) + window.requestAnimationFrame( + () => + (this._timeout = setTimeout(() => { + window.onAppReady() + if (process.platform === 'darwin') { + ipcRenderer.send('touch-bar-init') + } + }, 300)), + ) } componentWillReceiveProps(nextProps: Props) { diff --git a/src/index.ejs b/src/index.ejs index 1f221f2a..c429954a 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -45,7 +45,7 @@