Skip to content

Pushing onto the navstack will close the top item

Latest
Compare
Choose a tag to compare
@KevM KevM released this 11 Apr 15:24
· 2 commits to main since this release

##Navstack

Closeable

To bring symmetry to the navstack when an item is pushed on to the stack the (current) top item on the stack will be closed if it implements the Closable interface. This is just like popping the stack.

It is assumed that any resources you need to "Start" are setup in the bubble teaInitfunc which is always invoked before turning over control of the to the new model at the top of the stack.

Ordering

When pushing or popping models from/to the stack. The model's Init func is now always called before the model.Update with the WindowSizeMsg (used to force a size update). The resulting commands will be invoked sequentially. This maybe overkill as there should not be coupling between model setup and window sizing.