shouldRenderContentStage

fun shouldRenderContentStage(phase: ContentStagePhase, isMultiParty: Boolean, hasContentStageLayout: Boolean): Boolean

Decide WHEN the content-stage render branch fires, gated on the call phase. Pure so it can be unit tested without Compose. Mirrors web's shouldRenderContentStage.

Parameters

phase

mapped call phase (ContentStagePhase).

isMultiParty

more than one remote participant present.

hasContentStageLayout

a content-stage layout has resolved for this render (a pin or an INDEPENDENT content source). In 1:1 this is only ever true for INDEPENDENT content; legacy/flag-off 1:1 keeps the single swapped-video tile and never resolves a content-stage layout, so this stays false there (byte-identical to today).

Rules:

  • ContentStagePhase.InCall: renders when multi-party OR a content-stage layout is present (1:1 independent content).

  • ContentStagePhase.Waiting: renders ONLY when a content-stage layout is present (1:1 local independent share started before any remote joined).

  • any other phase: never renders the content stage.