Skip to content

Commit

Permalink
Pear.electron.getPathForFile -> Pear.media.getPathForFile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarkclements authored and rafapaezbas committed Jan 7, 2025
1 parent 39624da commit b6b5826
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions gui/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,14 @@ module.exports = class PearGUI extends ReadyResource {
camera: () => ipc.askForMediaAccess({ id, media: 'camera' }),
screen: () => ipc.askForMediaAccess({ id, media: 'screen' })
},
desktopSources: (options = {}) => ipc.desktopSources(options)
desktopSources: (options = {}) => ipc.desktopSources(options),
getPathForFile: (file) => electron.webUtils.getPathForFile(file)
}
this.badge = (count) => {
if (!Number.isInteger(+count)) throw new Error('argument must be an integer')
return ipc.badge(count)
}

this.electron = {}
this.electron.getPathForFile = (file) => {
return electron.webUtils.getPathForFile(file)
}

const kGuiCtrl = Symbol('gui:ctrl')

class Parent extends EventEmitter {
Expand Down

0 comments on commit b6b5826

Please sign in to comment.