lbry-desktop/ui/native.js
Sean Yesmunt cc568fb8cf working
2020-12-16 10:52:22 -05:00

19 lines
405 B
JavaScript

// @if TARGET='app'
import { ipcRenderer } from 'electron';
// @endif
const Native = {};
// @if TARGET='app'
Native.getAppVersionInfo = () =>
new Promise(resolve => {
// @if TARGET='app'
ipcRenderer.once('version-info-received', (event, versionInfo) => {
resolve(versionInfo);
});
ipcRenderer.send('version-info-requested');
// @endif
});
// @endif
export default Native;