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 () {
|
export function createContextMenu () {
|
||||||
const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener
|
const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll
|
||||||
const isListeningClipboard = db.get('settings.isListeningClipboard') || false
|
const isListeningClipboard = db.get('settings.isListeningClipboard') || false
|
||||||
if (process.platform === 'darwin' || process.platform === 'win32') {
|
if (process.platform === 'darwin' || process.platform === 'win32') {
|
||||||
const submenu = buildPicBedListMenu()
|
const submenu = buildPicBedListMenu()
|
||||||
|
@ -142,7 +142,7 @@ class LifeCycle {
|
|||||||
windowManager.create(IWindowList.TRAY_WINDOW)
|
windowManager.create(IWindowList.TRAY_WINDOW)
|
||||||
windowManager.create(IWindowList.SETTING_WINDOW)
|
windowManager.create(IWindowList.SETTING_WINDOW)
|
||||||
const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false
|
const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false
|
||||||
const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener
|
const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll
|
||||||
if (isAutoListenClipboard) {
|
if (isAutoListenClipboard) {
|
||||||
db.set('settings.isListeningClipboard', true)
|
db.set('settings.isListeningClipboard', true)
|
||||||
ClipboardWatcher.startListening()
|
ClipboardWatcher.startListening()
|
||||||
|
Loading…
Reference in New Issue
Block a user