ARK-Builders / ARK-Builders/Navigator

Crash on resource modification with multiple resources screens

Open
#305 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce:
1. Open resources screen
2. Select tag
3. Open gallery with this selection
4. Click on tag and then on `Navigate`, a new resources fragment will open
5. Modify a resource from this selection
6. Return to the first resources screen

The problem is that we are using `FragmentResult` to send tag or resource change events. But this event can only be consumed once, so the first resources fragment didn't update the selection and the index has already changed.

A possible solution is to replace the `FragmentResult` with changes flow in `ResourcesIndex` and `TagStorage`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the resources screens and fragments involved in the reproduction, then inspect how FragmentResult events are sent and consumed by ResourcesIndex and TagStorage. Reproduce the sequence with two resources screens and a modified resource; done means both screens retain the correct selection and index without a crash, with coverage for the event flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.