SinglePanelStackFrontendCoordinationRule
open class SinglePanelStackFrontendCoordinationRule<P : AnyPanel, S : PanelStackData<P>>(panelClass: KClass<P>, activeStack: LiveData<S>) : FrontendCoordinationRule
Content copied to clipboard
A rule that ensures there is only a single Frontend that shows Panels of type Ps at any time. It does this by closing the Panels of type Ps belonging to other Frontends when a Frontend opens a new one, causing activeStack to change.
Parameters
P
The type of the Panels to close when the Frontend owning the activeStack changes
S
The type of the PanelStackData.
panelClass
The KClass of the Panels to close when the Frontend owning the activeStack changes.
activeStack
The PanelStackData to observe in order to close other Frontends' Panels.
Constructors
Link copied to clipboard
fun <P : AnyPanel, S : PanelStackData<P>> SinglePanelStackFrontendCoordinationRule(panelClass: KClass<P>, activeStack: LiveData<S>)
Content copied to clipboard
Types
Functions
Link copied to clipboard
open override fun activate( lifecycleOwner: LifecycleOwner, iviServiceProvider: IviInstanceBoundIviServiceProvider, frontends: LiveData<out Collection<Frontend>>)
Content copied to clipboard
Actives the rule within the scope of the given lifecycleOwner.