kataras/go-events@v0.0.3 Once workaround.

This commit is contained in:
Miroslav Šedivý 2022-09-11 22:48:55 +02:00
parent 6d2ba7b640
commit c793ff1ff6

View File

@ -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()