Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 54e41f7

Browse files
Update npm dependencies again
Intentionally leaving a few behind: - electron: no native sodium for this ABI - flatpickr: updates break gathering date picker - scuttle-tag: 0.5.0 is experimental and I'm afraid to break anything - ssb-legacy-conn: we had issues and ssb-conn is coming soon anyway - ssb-markdown: need to add "open image" to context menu first
1 parent 78ba69d commit 54e41f7

File tree

3 files changed

+508
-485
lines changed

3 files changed

+508
-485
lines changed

lib/main-window.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module.exports = function (config) {
131131
const pendingCount = views.get('/mentions').pendingUpdates
132132

133133
watch(pendingCount, count => {
134-
electron.remote.app.setBadgeCount(count)
134+
electron.remote.app.badgeCount = count
135135
})
136136

137137
electron.ipcRenderer.on('goForward', views.goForward)
@@ -312,26 +312,25 @@ module.exports = function (config) {
312312
const element = h('a -drop', {
313313
'ev-click': () => {
314314
const rects = element.getBoundingClientRect()
315-
electron.remote.getCurrentWindow().webContents.getZoomFactor((factor) => {
316-
const menu = electron.remote.Menu.buildFromTemplate(items.map(item => {
317-
if (typeof item === 'function') {
318-
return item()
319-
} else if (item.separator) {
320-
return { type: 'separator' }
321-
} else {
322-
return {
323-
label: item[0],
324-
click () {
325-
navigate(item[1])
326-
}
315+
const factor = electron.remote.getCurrentWindow().webContents.zoomFactor
316+
const menu = electron.remote.Menu.buildFromTemplate(items.map(item => {
317+
if (typeof item === 'function') {
318+
return item()
319+
} else if (item.separator) {
320+
return { type: 'separator' }
321+
} else {
322+
return {
323+
label: item[0],
324+
click () {
325+
navigate(item[1])
327326
}
328327
}
329-
}))
330-
menu.popup({
331-
window: electron.remote.getCurrentWindow(),
332-
x: Math.round(rects.left * factor),
333-
y: Math.round(rects.bottom * factor) + 4
334-
})
328+
}
329+
}))
330+
menu.popup({
331+
window: electron.remote.getCurrentWindow(),
332+
x: Math.round(rects.left * factor),
333+
y: Math.round(rects.bottom * factor) + 4
335334
})
336335
}
337336
}, title)

0 commit comments

Comments
 (0)