bluelinelabs / bluelinelabs/Conductor

popController performing performControllerChange

Open
#410 3 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 have the following scenario:
Controller A -> Controller B -> Controller C.
Controller C needs to pop Controller B from the backstack which it does using popController(Controller B).
Unfortunately the function doesn't just remove Controller B from the backstack but also performs a controller change to Controller A (but shouldn't since C is still at the top):

This is basically the offending code:
```
if (removedTransaction != null) {
performControllerChange(nextTransaction, removedTransaction, false)
}
```
I think you can basically remove the code related to finding the nextTransaction:

```
for (RouterTransaction transaction : backstack) {
if (transaction.controller == controller) {
if (controller.isAttached()) {
trackDestroyingController(transaction);
}
backstack.remove(transaction);
}
}

```

Contributor guide

Open the contributing guide

Research direction

Start at the popController implementation and inspect the shown backstack-removal logic, including the removedTransaction and performControllerChange paths. Reproduce the Controller A → B → C scenario and verify that removing B leaves C at the top without changing to A; add or run the relevant controller navigation tests if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.