mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
🔨 Refactor: change linux clipboard watcher
This commit is contained in:
parent
6c18bcb130
commit
c6fcf0e551
@ -113,7 +113,7 @@ export function createMenu () {
|
||||
}
|
||||
|
||||
export function createContextMenu () {
|
||||
const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener
|
||||
const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll
|
||||
const isListeningClipboard = db.get('settings.isListeningClipboard') || false
|
||||
if (process.platform === 'darwin' || process.platform === 'win32') {
|
||||
const submenu = buildPicBedListMenu()
|
||||
|
@ -142,7 +142,7 @@ class LifeCycle {
|
||||
windowManager.create(IWindowList.TRAY_WINDOW)
|
||||
windowManager.create(IWindowList.SETTING_WINDOW)
|
||||
const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false
|
||||
const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener
|
||||
const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll
|
||||
if (isAutoListenClipboard) {
|
||||
db.set('settings.isListeningClipboard', true)
|
||||
ClipboardWatcher.startListening()
|
||||
|
Loading…
Reference in New Issue
Block a user