Add small comments

This commit is contained in:
ganfra
2023-03-09 17:54:35 +01:00
parent b348ad7af3
commit 399bfdc5e6
2 changed files with 11 additions and 0 deletions

View File

@@ -23,6 +23,11 @@ import com.bumble.appyx.core.node.ParentNode
import com.bumble.appyx.core.plugin.Plugin
import com.bumble.appyx.navmodel.backstack.BackStack
/**
* This class is just an helper for configuring a backstack directly in the constructor.
* With this we can more easily use constructor injection without having a secondary constructor to create the [BackStack] instance.
* Can be used instead of [ParentNode] in flow nodes.
*/
@Stable
abstract class BackstackNode<NavTarget : Any>(
val backstack: BackStack<NavTarget>,

View File

@@ -19,8 +19,14 @@ package io.element.android.libraries.architecture
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
/**
* This interface represents an entrypoint to a feature. Should be used to return the entrypoint node of the feature without exposing the internal types.
*/
interface FeatureEntryPoint
/**
* Can be used when the feature only exposes a simple node without the need of plugins.
*/
interface SimpleFeatureEntryPoint : FeatureEntryPoint {
fun createNode(parentNode: Node, buildContext: BuildContext): Node
}