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

Toggle settings with CommandOrCtrl+. #1209

Merged
merged 5 commits into from Nov 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/main-window.js
Expand Up @@ -58,6 +58,10 @@ module.exports = function (config) {
const includeParticipating = api.settings.obs.get('patchwork.includeParticipating', false)
const autoDeleteBlocked = api.settings.obs.get('patchwork.autoDeleteBlocked', false)

electron.remote.globalShortcut.register('CmdOrCtrl+,', () => {
toggleView('/settings')
})

// prompt to setup profile on first use
onceTrue(api.sbot.obs.connection, (ssb) => {
ssb.latestSequence(api.keys.sync.id(), (err, key) => {
Expand Down Expand Up @@ -245,6 +249,8 @@ module.exports = function (config) {
views.html
])

const toggleView = view => { if (views.currentView() === view) { views.goBack() } else { navigate(view) } }

const previewElement = api.app.linkPreview(container, 500)

catchLinks(container, (href, external, anchor) => {
Expand Down