Skip to content

v0.5.0

Latest

Choose a tag to compare

@hexxfy hexxfy released this 03 Jun 20:02
· 1 commit to master since this release

Breaking changes

  • Replace the Dispatcher API (ListenFunc, EventType, NewEvent, Event) with type-safe On[T] and Emit.
  • Remove string EventType constants and the Event{type, payload} envelope; events are now plain structs.
  • Remove the per-dialog Events field in favor of typed OnResponse callbacks.

Features

  • Add generic type-safe event handling via On[T] and Emit.
  • Add EventEmitter interface with BaseEventEmitter and SetEventEmitter for wrapping event dispatch.
  • Add typed OnResponse callbacks to MessageDialog, InputDialog, ListDialog and TabListDialog.

Improvements

  • Route events by Go type instead of strings.
  • Dispatch event handlers synchronously and in order.
  • Drop the golang.org/x/sync dependency.