refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
This commit is contained in:
parent
f2d41b7812
commit
8d83518f9a
15 changed files with 57 additions and 25 deletions
|
@ -56,8 +56,8 @@ app.isPackaged = (() => {
|
|||
|
||||
app._setDefaultAppPaths = (packagePath) => {
|
||||
// Set the user path according to application's name.
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()))
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()))
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.name!))
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.name!))
|
||||
app.setAppPath(packagePath)
|
||||
|
||||
// Add support for --user-data-dir=
|
||||
|
@ -89,6 +89,7 @@ for (const name of events) {
|
|||
// Property Deprecations
|
||||
deprecate.fnToProperty(app, 'accessibilitySupportEnabled', '_isAccessibilitySupportEnabled', '_setAccessibilitySupportEnabled')
|
||||
deprecate.fnToProperty(app, 'badgeCount', '_getBadgeCount', '_setBadgeCount')
|
||||
deprecate.fnToProperty(app, 'name', '_getName', '_setName')
|
||||
|
||||
// Wrappers for native classes.
|
||||
const { DownloadItem } = process.electronBinding('download_item')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue