bluelinelabs / bluelinelabs/Conductor

Recursively set lifecycle listeners

Open
#439 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.9k
Forks
338
PR merge metrics
No merged PRs in 30d

Description

I'm wondering if it's possible to achieve the behavior of setting a `Controller.LifecycleListener` that gets set on a router to be attached to each controllers' child routers. Doesn't seem like it's possible.

The question arises from the ability to do so on fragments via `FragmentManager#registerFragmentLifecycleCallbacks(FragmentLifecycleCallbacks cb, boolean recursive`.

So I guess in conductor it would look something like `router.addChangeListener(changeListener, true)`

I think it could be useful for conductor to support something like this.

Thoughts?

Contributor guide

Open the contributing guide

Research direction

Start by reading Controller.LifecycleListener and the router listener API, especially the proposed router.addChangeListener(changeListener, true) behavior. Compare it with FragmentManager#registerFragmentLifecycleCallbacks and determine the intended recursive scope. Done means reaching agreement on the API and ensuring a listener registered on a router is attached to each child router.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.