pub fn apply_action(
app: &mut App,
action: Action,
_command_tx: &Sender<Command>,
) -> Option<Command>Expand description
Apply an action to the application state.
This function handles both UI-only actions (which modify app state directly) and command actions (which return a command to be sent to the background worker).
§Arguments
app- Mutable reference to the application stateaction- The action to apply_command_tx- Channel for sending commands (used for reference, actual sending done by caller)
§Returns
Some(Command) if an async command should be sent to the background worker,
None if the action was handled entirely within the UI.