fix tray traffic

This commit is contained in:
pompurin404 2024-08-31 22:46:19 +08:00
parent ba4de39f1e
commit 704a322c25
No known key found for this signature in database

View File

@ -145,9 +145,14 @@ const ConnCard: React.FC = () => {
if (platform === 'darwin' && showTraffic) { if (platform === 'darwin' && showTraffic) {
if (drawing) return if (drawing) return
drawing = true drawing = true
try {
await drawSvg(info.up, info.down) await drawSvg(info.up, info.down)
hasShowTraffic = true hasShowTraffic = true
} catch {
// ignore
} finally {
drawing = false drawing = false
}
} else { } else {
if (!hasShowTraffic) return if (!hasShowTraffic) return
window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64) window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64)