Browse Source

Add check for plaftorm

master
Loëck Vézien 7 years ago
parent
commit
f26c126c09
No known key found for this signature in database GPG Key ID: CBCDCE384E853AC4
  1. 2
      src/components/AccountPage/index.js
  2. 2
      src/components/DashboardPage/index.js
  3. 2
      src/index.ejs

2
src/components/AccountPage/index.js

@ -85,6 +85,7 @@ class AccountPage extends PureComponent<Props, State> {
return
}
if (process.platform === 'darwin') {
ipcRenderer.send('touch-bar-update', {
text: account.name,
color: account.currency.color,
@ -98,6 +99,7 @@ class AccountPage extends PureComponent<Props, State> {
},
})
}
}
handleChangeSelectedTime = item =>
this.setState({

2
src/components/DashboardPage/index.js

@ -85,7 +85,7 @@ class DashboardPage extends PureComponent<Props, State> {
handleCalculateBalance = data => {
const { counterValue } = this.props
if (this._cacheBalance !== data.totalBalance) {
if (process.platform === 'darwin' && this._cacheBalance !== data.totalBalance) {
this._cacheBalance = data.totalBalance
ipcRenderer.send('touch-bar-update', {

2
src/index.ejs

@ -62,8 +62,10 @@
preloadEl.addEventListener('transitionend', () => preloadEl.remove())
}
if (process.platform === 'darwin') {
ipcRenderer.emit('touch-bar-init')
}
}
if (name === 'MainWindow') {
preloadEl.style.display = 'flex'

Loading…
Cancel
Save