File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ menubarApp.on('ready', () => {
77
77
}
78
78
}
79
79
} ) ;
80
+ ipcMain . on ( 'get-platform' , ( event ) => {
81
+ event . returnValue = process . platform ;
82
+ } ) ;
80
83
81
84
menubarApp . window . webContents . on ( 'devtools-opened' , ( ) => {
82
85
menubarApp . window . setSize ( 800 , 600 ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ module.exports = {
31
31
ipcRenderer : {
32
32
send : jest . fn ( ) ,
33
33
on : jest . fn ( ) ,
34
+ sendSync : ( ) => 'darwin' ,
34
35
} ,
35
36
shell : {
36
37
openExternal : jest . fn ( ) ,
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ import { IconQuit } from '../icons/Quit';
14
14
import { updateTrayIcon } from '../utils/comms' ;
15
15
import { setAppearance } from '../utils/appearance' ;
16
16
17
- const isLinux = remote . process . platform === 'linux' ;
17
+ const platform = ipcRenderer . sendSync ( 'get-platform' ) ;
18
+ const isLinux = platform === 'linux' ;
18
19
19
20
export const SettingsRoute : React . FC = ( ) => {
20
21
const { settings, updateSetting, logout } = useContext ( AppContext ) ;
You can’t perform that action at this time.
0 commit comments