mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix tray traffic
This commit is contained in:
parent
ba4de39f1e
commit
704a322c25
@ -145,9 +145,14 @@ const ConnCard: React.FC = () => {
|
||||
if (platform === 'darwin' && showTraffic) {
|
||||
if (drawing) return
|
||||
drawing = true
|
||||
await drawSvg(info.up, info.down)
|
||||
hasShowTraffic = true
|
||||
drawing = false
|
||||
try {
|
||||
await drawSvg(info.up, info.down)
|
||||
hasShowTraffic = true
|
||||
} catch {
|
||||
// ignore
|
||||
} finally {
|
||||
drawing = false
|
||||
}
|
||||
} else {
|
||||
if (!hasShowTraffic) return
|
||||
window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user