Skip to content

Commit

Permalink
v8.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Feb 24, 2019
1 parent 63882c3 commit b5197d4
Show file tree
Hide file tree
Showing 107 changed files with 928 additions and 394 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ npm run localsetup
Parameters:

- `--build` Rebuilds app before installation
- `--preview` Build "Preview" app
- `--debug` Start with enabled development tools
- `--beta` Build Beta application version

#### <a name="build"/></a>*build*

Expand All @@ -168,7 +168,7 @@ Parameters:
- `--macos` Build & Package for macOS
- `--windows` Build & Package for Windows
- `--linux` Build & Package for Linux
- `--beta` Build Beta application version
- `--preview` Build "Preview" app



Expand Down Expand Up @@ -228,5 +228,5 @@ MIT

## <a name="author"/></a> Author

[sidneys](http://sidneys.github.io) 2018
[sidneys](http://sidneys.github.io) 2019

24 changes: 24 additions & 0 deletions RELEASENOTES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
{
"8.9.5": {
"🍾 features": [
"implements `Web Audio`-based audio pipeline, superseding usages of `AudioElement`, fixing delayed/skipped notification sounds when running in the background",
"adds `PB for Desktop Preview` app build, allowing for installation of prerelease builds side-by-side with the regular app",
"optimizes rendering / backgrounding strategy for continuous background usage"
],
"🚨 fixes": [
"adds fix for `electron/electron` upstream issue: [BrowserWindow.getAllWindows doesn't return windows that inherit BrowserWindow](https://github.com/electron/electron/issues/15456)",
"adds fix for `goldfire/howler.js` upstream issue: [Chrome 52 audio can't be heard after _autoResume](https://github.com/goldfire/howler.js/issues/593)"
],
"💎 improvements": [
"upgrades `Favicon Finder` backend to latest upstream revision: https://pb-for-desktop-besticon.herokuapp.com",
"consolidated format of all enclosed audio assets (44.1 kHz, Wave/PCM, 16 bit, 2 channels)"
],
"📒 documentation": [
"updates README",
"extends Pushbullet TypeScript declaration file"
],
"👷 internals": [
"extends development & deployment toolchain",
"upgrades internal modules",
"upgrades external `node_modules`"
]
},
"8.8.8": {
"🚨 fixes": [
"fixes intermittent rendering of Dock Icon Count badge when disabled ",
Expand Down
90 changes: 47 additions & 43 deletions app/scripts/main/components/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,6 @@ const path = require('path')
const electron = require('electron')
const { app, BrowserWindow, systemPreferences } = electron

/**
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
const logger = require('@sidneys/logger')({ write: true })
const platformTools = require('@sidneys/platform-tools')
/* eslint-disable no-unused-vars */
const debugService = require('@sidneys/electron-debug-service')
const updaterService = require('@sidneys/electron-updater-service')
const powerService = require('@sidneys/electron-power-service')
/* eslint-enable */

/**
* Modules
* Configuration
*/
appRootPath.setPath(path.join(__dirname, '..', '..', '..', '..'))

/**
* Modules
* Internal
* @constant
*/
/* eslint-disable no-unused-vars */
const globals = require(path.join(appRootPath['path'], 'app', 'scripts', 'main', 'components', 'globals'))
/* eslint-enable */


/**
* HOTFIX
Expand All @@ -56,46 +27,79 @@ app.disableHardwareAcceleration()

/**
* HOTFIX
* EventEmitter Memory Leak
* @see {@link https://stackoverflow.com/questions/9768444/possible-eventemitter-memory-leak-detected}
* Chrome 66 Autoplay Policy
* @see {@link https://github.com/electron/electron/issues/13525}
*/
events.EventEmitter.defaultMaxListeners = Infinity
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required')

/**
* HOTFIX
* Chrome 66 Autoplay Policy
* @see {@link https://github.com/electron/electron/issues/13525}
* Audio Playback
* @see {@link https://github.com/electron/electron/issues/12048}
*/
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required')
// app.commandLine.appendSwitch('disable-renderer-backgrounding')

/**
* HOTFIX
* Electron Security Warning
* @see {@link https://stackoverflow.com/questions/48854265/why-do-i-see-an-electron-security-warning-after-updating-my-electron-project-t}
* @see {@link https://stackoverflow.com/questions/48854265}
*/
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

/**
* HOTFIX
* Notification API not working (Windows)
* EventEmitter Memory Leak
* @see {@link https://stackoverflow.com/questions/9768444}
*/
events.EventEmitter.defaultMaxListeners = Infinity

/**
* HOTFIX (Windows)
* Notification API not working
* @see {@link https://github.com/electron/electron/issues/10864}
*/
if (platformTools.isWindows) {
app.setAppUserModelId(global.manifest.appId)
}
process.platform === 'win32' ? app.setAppUserModelId(global.manifest.appId) : void 0

/**
* HOTFIX
* Missing App Indicator (Linux)
* HOTFIX (Linux)
* Missing App Indicator
* @see {@link https://github.com/electron/electron/issues/10427}
*/
if (platformTools.isLinux) {
if (process.platform === 'linux') {
if (process.env.XDG_DATA_DIRS.includes('plasma')) {
process.env.XDG_CURRENT_DESKTOP = 'Unity'
}
}


/**
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
const logger = require('@sidneys/logger')({ write: true })
/* eslint-disable no-unused-vars */
const debugService = require('@sidneys/electron-debug-service')
const updaterService = require('@sidneys/electron-updater-service')
const powerService = require('@sidneys/electron-power-service')
/* eslint-enable */

/**
* Modules
* Configuration
*/
appRootPath.setPath(path.join(__dirname, '..', '..', '..', '..'))

/**
* Modules
* Internal
* @constant
*/
/* eslint-disable no-unused-vars */
const globals = require(path.join(appRootPath['path'], 'app', 'scripts', 'main', 'components', 'globals'))
/* eslint-enable */

/**
* Modules
* Internal
Expand Down
3 changes: 0 additions & 3 deletions app/scripts/main/components/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const appRootPath = require('app-root-path')
const packageJson = require(path.join(appRootPath['path'], 'package.json'))


/** @namespace global */


/**
* Manifest
* @global
Expand Down
3 changes: 3 additions & 0 deletions app/scripts/main/services/snoozer-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const notificationProvider = require('@sidneys/electron-notification-provider')
* @namespace Electron
*/
class SnoozerService {
/**
* @constructor
*/
constructor() {
this.snoozeUntil = 0
}
Expand Down
30 changes: 18 additions & 12 deletions app/scripts/main/windows/main-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,21 @@ const windowUrl = url.format({ protocol: 'file:', pathname: windowHtml })

/**
* @class MainWindow
* @extends Electron.BrowserWindow
* @property {Electron.BrowserWindow} browserWindow
* @namespace Electron
*/
class MainWindow extends BrowserWindow {
class MainWindow {
/**
* @constructor
*/
constructor() {
super({
// Create BrowserWindow
this.browserWindow = new BrowserWindow({
acceptFirstMouse: true,
autoHideMenuBar: true,
// Hotfix: Window Translucency, https://github.com//electron/electron/issues/2170
// backgroundColor: platformTools.isMacOS ? void 0 : '#95A5A6',
backgroundColor: '#303030',
backgroundThrottling: false,
frame: true,
hasShadow: platformTools.isMacOS ? true : void 0,
height: void 0,
Expand All @@ -78,17 +81,19 @@ class MainWindow extends BrowserWindow {
experimentalCanvasFeatures: true,
experimentalFeatures: true,
nodeIntegration: true,
nodeIntegrationInWorker: true,
partition: 'persist:app',
scrollBounce: platformTools.isMacOS ? true : void 0,
webaudio: true,
webgl: false,
webgl: true,
webSecurity: false
},
width: void 0,
x: void 0,
y: void 0
})

// Init
this.init()
}

Expand All @@ -99,21 +104,21 @@ class MainWindow extends BrowserWindow {
logger.debug('init')

/**
* @listens MainWindow#close
* @listens Electron.BrowserWindow#close
*/
this.on('close', (event) => {
this.browserWindow.on('close', (event) => {
logger.debug('AppWindow#close')

if (global.state.isQuitting === false) {
event.preventDefault()
this.hide()
this.browserWindow.hide()
}
})

/**
* @listens MainWindow:will-navigate
* @listens Electron.webContents:will-navigate
*/
this.webContents.on('will-navigate', (event, url) => {
this.browserWindow.webContents.on('will-navigate', (event, url) => {
logger.debug('AppWindow.webContents#will-navigate')

if (url) {
Expand All @@ -123,7 +128,7 @@ class MainWindow extends BrowserWindow {
})


this.loadURL(windowUrl)
this.browserWindow.loadURL(windowUrl)
}
}

Expand All @@ -136,7 +141,8 @@ let init = () => {

// Ensure single instance
if (!global.mainWindow) {
global.mainWindow = new MainWindow()
const mainWindow = new MainWindow()
global.mainWindow = mainWindow.browserWindow
}
}

Expand Down
5 changes: 0 additions & 5 deletions app/scripts/renderer/pushbullet/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ const configurationManager = remote.require(path.join(appRootPath, 'app', 'scrip
*/
const defaultInterval = 2000


/** @namespace pb.account.pro */
/** @namespace pb.e2e.encrypt */


/**
* Retrieve PushbulletClipboardEnabled
* @return {Boolean} - Enabled
Expand Down
Loading

0 comments on commit b5197d4

Please sign in to comment.