[Bug]: Hidden Nearby map overlaps the active tab after returning to the app from background/lock screen
Maintainers usually reply within 1 day
@dkrrish9 is already working on this.
Since Nov 30, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
Starting from a fresh launch, if we open a tab (like Contributions or Bookmarks/Explore before visiting Nearby), then visit the Nearby tab and switch back to that earlier tab, leaving the app (going to Home, switching to another app via Recents or locking the device) and coming back causes the Nearby map to show up on top of the screen. The toolbar title and bottom navigation bar still show the tab we were actually on (for example Contributions or Bookmarks), while the screen itself shows the Nearby map.
Once in this state, tapping the currently selected tab or switching between other tabs that were visited before Nearby does not clear the Nearby map. The only way to get the other tabs back is to tap the Nearby tab once and then switch away from it.
Root cause:
- PR #7349 updated
MainNavigationHelper(MainNavigationHelper.kt) to keep tab fragments alive usingadd(),hide(), andshow()inperformLoad()instead ofreplace().FragmentManagerhides inactive tabs by setting their root view toView.GONEwhile keeping them in theRESUMEDstate. - In
fragment_nearby_parent.xml,coordinator_layoutis the root view ofNearbyParentFragment. - On returning to the app,
MainActivity.onResume()triggersonResume()on all added fragments, including the hiddenNearbyParentFragment. NearbyParentFragment.onResume()unconditionally setsbinding?.coordinatorLayout?.visibility = View.VISIBLE(line 961, added in PR #6187), overridingFragmentManager'sView.GONE. SinceNearbyParentFragmentwas added toR.id.fragmentContainerafter the earlier tabs, it draws on top of them andhideActiveFragment()only hidesactiveFragmentso Nearby stays visible until we navigate to Nearby and then leave it.
Steps to reproduce
- Open the app (when logged in, it opens on the Contributions tab).
- Tap on the Nearby tab.
- Switch back to the Contributions tab.
- Go to Home, switch to another app from Recents or lock and unlock the device.
- Come back to the Commons app.
- Observe that the toolbar and bottom navigation bar still show Contributions but the screen displays the Nearby map on top.
- Tap on the Contributions tab and observe that nothing happens and the Nearby map stays on screen.
- Tap on the Nearby tab once and then tap on Contributions. Now the Nearby map disappears and the Contributions screen is shown again.
Other tested flows that also reproduce the same issue (starting from a fresh app launch):
Contributions -> Explore -> Nearby -> Explore -> Home -> back to the appContributions -> Bookmarks -> Nearby -> Bookmarks -> Home -> back to the app
Expected behaviour
Coming back to the app should continue showing the tab you were on (Contributions, Explore, or Bookmarks). The hidden Nearby tab should stay hidden.
Actual behaviour
Coming back to the app shows the Nearby map covering the screen while the toolbar and bottom navigation bar remain on the last active tab. Tapping the active tab does not dismiss the Nearby map until you tap the Nearby tab once and then switch away from it.
Device name
OnePlus Nord 5
Android version
Android 16 (API 36)
Commons app version
6.9.0-debug-main (BetaDebug)
Device logs
No response
Screenshots
| Contributions tab | Explore tab | Bookmarks tab |
|---|---|---|
Would you like to work on the issue?
Yes
- Dominant language
- Kotlin
- Stars
- 1.2k
- Forks
- 1.4k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 156
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from commons-app/apps-android-commons
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
commons-app/apps-android-commons#7486 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
commons-app/apps-android-commons#7464 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Media detail page crashes on file pages with unclosed [[Category: markupPossibly taken @dkrrish9 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
commons-app/apps-android-commons#7423 · 7 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug]: WikiSite treats the /w/ script path as a language variant, producing a bogus "w" language codePossibly taken @shryssssss-maker claimed this 4 days ago. Opendebated
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
commons-app/apps-android-commons#7422 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
test: unit tests for WikiSite (sub-issue of #6630)Possibly taken @Seyamalam claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
commons-app/apps-android-commons#7419 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in commons-app/apps-android-commons
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
carlrobertoh/ProxyAI#1250 ·
-
Location search keeps showing stale "Open-Meteo can't find ..." message after clearing search queryOpenBug Needs review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
breezy-weather/breezy-weather#3082 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
wangzan101/Mika#1033 ·
Maintainers usually reply within 1 day
-
area: ci area: local-media area: startup area: ui platform: bilibili platform: netease platform: youtube status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cwuom/NeriPlayer#794 ·
Maintainers usually reply within 1 day
-
area:android area:ui bug priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
meraxes89/streamify-apk#449 ·
Maintainers usually reply within 1 day