badoo / badoo/RIBs

Lifecycle events can be missing

Open
#44 3 comments 0 reactions 1 assignee Claimed by @zsoltk View on GitHub
Dominant language
Kotlin
Stars
164
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Let's consider next situation.
You added container RIB with Screen1Rib.
Than during work with this RIB you decided to replace it to another Screen2Rib inside same container.
Screen2Rib will not receive onStart and onResume events because of this code:

```
fun onAttach(savedInstanceState: Bundle?) {
tag = savedInstanceState?.getString(KEY_TAG) ?: tag
lifecycleRelay.accept(ACTIVE)
ribLifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE)
onAttach(ribLifecycleRegistry, savedInstanceState)
}
```

I think when you attaching/replacing RIB you should receive lifecycleEvents.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.