Documentation ¶
Overview ¶
Package read implements a read state with an event handler API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func NewState ¶
func NewState(state *state.State, r handlerrepo.AddHandler) *State
func (*State) MarkUnread ¶
func (*State) OnUpdate ¶ added in v0.2.0
func (r *State) OnUpdate(fn func(*UpdateEvent)) (rm func())
OnUpdate adds a read update callback into the list. This function is thread-safe. It is synchronous by default.
type UpdateEvent ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.