John O'Reilly
06/07/2024, 6:06 PMDefaultSettingsComponent
is created....normally component would be part of tree of components with root one having navigation stack so navigation.pop()
for example can be passed down to child components.Arkadii Ivanov
06/07/2024, 7:18 PMDefaultSettingsComponent
is singleton, not tied to an activity. I don't remember all the details currently, but it might be possible to move it inside the root component (using childContext
), and expose it from there.Arkadii Ivanov
06/07/2024, 7:25 PMval appComponent =
handleDeepLink { uri ->
val initialConferenceId = uri?.extractConferenceIdOrNull()
val rootComponentContext = defaultComponentContext(discardSavedState = initialConferenceId != null)
val appComponent = DefaultAppComponent(
componentContext = rootComponentContext.childContext("app"),
initialConferenceId = initialConferenceId,
...
)
val settingsComponent = DefaultSettingsComponent(
componentContext = rootComponentContext.childContext("settings"),
...
)
appComponent to settingsComponent
} ?: return
John O'Reilly
06/07/2024, 7:33 PMJohn O'Reilly
06/08/2024, 4:21 PMArkadii Ivanov
06/08/2024, 4:22 PMJohn O'Reilly
06/08/2024, 7:08 PMArkadii Ivanov
06/09/2024, 10:20 AMArkadii Ivanov
06/09/2024, 10:24 AMDefaultSettingsComponent
, so I'm not sure why did you need to change its scope. You only handle the back button in the UI. So perhaps, you could just pass SettingsComponent
via DI instead of using by inject
in DefaultConferenceComponent
.Arkadii Ivanov
06/09/2024, 10:25 AMSettingsComponent
in the root component.John O'Reilly
06/09/2024, 10:43 AM