Restore commented out code.

Fix regression from #5253
This commit is contained in:
Benoit Marty
2025-09-08 16:42:58 +02:00
parent 943bbee131
commit 20b6f0d6ee

View File

@@ -26,7 +26,7 @@ import io.element.android.libraries.architecture.inputs
class ViewFolderNode(
@Assisted buildContext: BuildContext,
@Assisted plugins: List<Plugin>,
// presenterFactory: ViewFolderPresenter.Factory,
presenterFactory: ViewFolderPresenter.Factory,
) : Node(buildContext, plugins = plugins) {
data class Inputs(
val canGoUp: Boolean,
@@ -40,10 +40,10 @@ class ViewFolderNode(
private val inputs: Inputs = inputs()
// private val presenter = presenterFactory.create(
// canGoUp = inputs.canGoUp,
// path = inputs.path,
// )
private val presenter = presenterFactory.create(
canGoUp = inputs.canGoUp,
path = inputs.path,
)
private fun onBackClick() {
plugins<Callback>().forEach { it.onBackClick() }
@@ -55,12 +55,12 @@ class ViewFolderNode(
@Composable
override fun View(modifier: Modifier) {
// val state = presenter.present()
// ViewFolderView(
// state = state,
// modifier = modifier,
// onNavigateTo = ::onNavigateTo,
// onBackClick = ::onBackClick,
// )
val state = presenter.present()
ViewFolderView(
state = state,
modifier = modifier,
onNavigateTo = ::onNavigateTo,
onBackClick = ::onBackClick,
)
}
}