Enhancements & Bug Fixes
- Line, and histogram data can now be accessed from their `data` methods. - Fixed a bug causing `maximize` to fail if a screen is not specified - Global events can now be coroutines or functions.
This commit is contained in:
@ -99,7 +99,11 @@ class Emitter:
|
||||
return self
|
||||
|
||||
def _emit(self, *args):
|
||||
self._callable(*args) if self._callable else None
|
||||
if self._callable:
|
||||
if asyncio.iscoroutinefunction(self._callable):
|
||||
asyncio.create_task(self._callable(*args))
|
||||
else:
|
||||
self._callable(*args)
|
||||
|
||||
|
||||
class JSEmitter:
|
||||
|
||||
Reference in New Issue
Block a user