diff --git a/lib/depject/contact/html/follow-toggle.js b/lib/depject/contact/html/follow-toggle.js index b47e3eac3..314364d0f 100644 --- a/lib/depject/contact/html/follow-toggle.js +++ b/lib/depject/contact/html/follow-toggle.js @@ -94,45 +94,44 @@ exports.create = function (api) { ? ignoring : status === false - electron.remote.getCurrentWindow().webContents.getZoomFactor((factor) => { - const menu = electron.remote.Menu.buildFromTemplate([ - { - type: 'radio', - label: i18n('Neutral'), - checked: status == null, - click: () => setStatus(id, null, { states, ignores }) - }, - { - type: 'radio', - label: i18n('Follow'), - checked: status === true, - click: () => setStatus(id, true, { states, ignores }) - }, - { - type: 'radio', - label: i18n('Block'), - checked: status === false, - click: () => setStatus(id, false, { states, ignores }) - }, - { type: 'separator' }, - { - type: 'radio', - label: i18n('Listen'), - checked: !resolvedIgnoring, - click: () => setIgnore(id, false, { states, ignores }) - }, - { - type: 'radio', - label: i18n('Ignore'), - checked: resolvedIgnoring, - click: () => setIgnore(id, true, { states, ignores }) - } - ]) - menu.popup({ - window: electron.remote.getCurrentWindow(), - x: Math.round(rects.left * factor), - y: Math.round(rects.bottom * factor) + 4 - }) + const factor = electron.remote.getCurrentWindow().webContents.getZoomFactor() + const menu = electron.remote.Menu.buildFromTemplate([ + { + type: 'radio', + label: i18n('Neutral'), + checked: status == null, + click: () => setStatus(id, null, { states, ignores }) + }, + { + type: 'radio', + label: i18n('Follow'), + checked: status === true, + click: () => setStatus(id, true, { states, ignores }) + }, + { + type: 'radio', + label: i18n('Block'), + checked: status === false, + click: () => setStatus(id, false, { states, ignores }) + }, + { type: 'separator' }, + { + type: 'radio', + label: i18n('Listen'), + checked: !resolvedIgnoring, + click: () => setIgnore(id, false, { states, ignores }) + }, + { + type: 'radio', + label: i18n('Ignore'), + checked: resolvedIgnoring, + click: () => setIgnore(id, true, { states, ignores }) + } + ]) + menu.popup({ + window: electron.remote.getCurrentWindow(), + x: Math.round(rects.left * factor), + y: Math.round(rects.bottom * factor) + 4 }) }