
by adding functions to the public API which determine if state changes should be shown to the user and use them (instead of duplicating similar logic).
by adding functions to the public API which determine if state changes should be shown to the user and use them (instead of duplicating similar logic).