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 (drawing) return
drawing = true
try {
await drawSvg(info.up, info.down)
hasShowTraffic = true
} catch {
// ignore
} finally {
drawing = false
}
} else {
if (!hasShowTraffic) return
window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64)