mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10: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 (platform === 'darwin' && showTraffic) {
|
||||||
if (drawing) return
|
if (drawing) return
|
||||||
drawing = true
|
drawing = true
|
||||||
await drawSvg(info.up, info.down)
|
try {
|
||||||
hasShowTraffic = true
|
await drawSvg(info.up, info.down)
|
||||||
drawing = false
|
hasShowTraffic = true
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
} finally {
|
||||||
|
drawing = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!hasShowTraffic) return
|
if (!hasShowTraffic) return
|
||||||
window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64)
|
window.electron.ipcRenderer.send('trayIconUpdate', trayIconBase64)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user