🎨 Improve the mouse hove data sync button information on the desktop and browser https://github.com/siyuan-note/siyuan/issues/8521

This commit is contained in:
Daniel 2023-06-12 10:45:47 +08:00
parent b53d210258
commit d138e5c04c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -653,10 +653,19 @@ var (
onlineKernelsLock = sync.Mutex{}
)
func GetOnlineKernels() []*OnlineKernel {
func GetOnlineKernels() (ret []*OnlineKernel) {
ret = []*OnlineKernel{}
onlineKernelsLock.Lock()
defer onlineKernelsLock.Unlock()
return onlineKernels
tmp := onlineKernels
onlineKernelsLock.Unlock()
for _, kernel := range tmp {
if kernel.ID == kernelID {
continue
}
ret = append(ret, kernel)
}
return
}
var closedSyncWebSocket = false