mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
kataras/go-events@v0.0.3 Once workaround.
This commit is contained in:
parent
6d2ba7b640
commit
c793ff1ff6
@ -43,7 +43,12 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) bool {
|
|||||||
|
|
||||||
finished := make(chan bool)
|
finished := make(chan bool)
|
||||||
drop.Emmiter.Once("finish", func(payload ...any) {
|
drop.Emmiter.Once("finish", func(payload ...any) {
|
||||||
finished <- payload[0].(bool)
|
b, ok := payload[0].(bool)
|
||||||
|
// workaround until https://github.com/kataras/go-events/pull/8 is merged
|
||||||
|
if !ok {
|
||||||
|
b = (payload[0].([]any))[0].(bool)
|
||||||
|
}
|
||||||
|
finished <- b
|
||||||
})
|
})
|
||||||
|
|
||||||
manager.ResetKeys()
|
manager.ResetKeys()
|
||||||
|
Loading…
Reference in New Issue
Block a user