Skip to content

Commit

Permalink
- fix main presenter onAttachView being called twice + logs and comm…
Browse files Browse the repository at this point in the history
…ents (#119)
  • Loading branch information
rodvar authored Dec 16, 2024
1 parent 3656268 commit d6a1852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import org.koin.core.qualifier.named

@Composable
fun TakeOfferReviewTradeScreen() {
// TODO presenter for this? And call RememberLifecycle...

val navController: NavHostController = koinInject(named("RootNavController"))
TakeOfferScaffold {
Column(modifier = Modifier.padding(horizontal = 32.dp, vertical = 24.dp)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ abstract class BasePresenter(private val rootPresenter: MainPresenter?): ViewPre
}

@CallSuper
override fun onViewAttached() { }
override fun onViewAttached() {
log.i { "Lifecycle: View attached to presenter" }
}

@CallSuper
override fun onViewUnattaching() { }
Expand Down Expand Up @@ -116,8 +118,7 @@ abstract class BasePresenter(private val rootPresenter: MainPresenter?): ViewPre
// at the moment the attach view is with the activity/ main view in ios
// unless we change this there is no point in sharing with dependents
this.view = view
log.i { "Lifecycle: View Attached to Presenter" }
onViewAttached()
log.i { "Lifecycle: Main View attached to Main Presenter" }
}

fun detachView() {
Expand Down

0 comments on commit d6a1852

Please sign in to comment.