From 808939ca722bb760517a5ffaddedb9bb06091125 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 20 May 2026 09:29:48 +0000 Subject: Fix blank track list and Recenter button bleed-through in Saved Tracks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SavedTracksFragment was missing adapter.submitList(tracks) after the collect block rewrite — tracks loaded fine (16 found via SAF) but the RecyclerView adapter never received them, leaving the list visually blank - showOverlay() now also hides fabRecenter; it was not in the hide list so the map's Recenter button remained visible on top of the fragment overlay https://claude.ai/code/session_01YUbuZNDAoLea4cf9UGQ9qn --- android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt | 3 +++ .../app/src/main/kotlin/org/terst/nav/track/SavedTracksFragment.kt | 1 + 2 files changed, 4 insertions(+) (limited to 'android-app') diff --git a/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt b/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt index 8e4a2e1..a4453be 100644 --- a/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt +++ b/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt @@ -429,6 +429,7 @@ class MainActivity : AppCompatActivity(), SafetyFragment.SafetyListener { fragmentContainer.visibility = View.VISIBLE fabRecordTrack.visibility = View.GONE fabLayers.visibility = View.GONE + fabRecenter.visibility = View.GONE supportFragmentManager.beginTransaction() .replace(R.id.fragment_container, fragment) .commit() @@ -438,6 +439,8 @@ class MainActivity : AppCompatActivity(), SafetyFragment.SafetyListener { fragmentContainer.visibility = View.GONE fabRecordTrack.visibility = View.VISIBLE fabLayers.visibility = View.VISIBLE + // fabRecenter visibility is managed by the isFollowing observer; just restore alpha + fabRecenter.alpha = 1f // Re-apply cached conditions in case they arrived while the overlay was covering the sheet lastConditions?.let { applyConditions(it) } } diff --git a/android-app/app/src/main/kotlin/org/terst/nav/track/SavedTracksFragment.kt b/android-app/app/src/main/kotlin/org/terst/nav/track/SavedTracksFragment.kt index bef9df3..d8b9858 100644 --- a/android-app/app/src/main/kotlin/org/terst/nav/track/SavedTracksFragment.kt +++ b/android-app/app/src/main/kotlin/org/terst/nav/track/SavedTracksFragment.kt @@ -54,6 +54,7 @@ class SavedTracksFragment : Fragment() { viewLifecycleOwner.lifecycleScope.launch { viewModel.savedTracks.collect { tracks -> + adapter.submitList(tracks) val empty = tracks.isEmpty() layoutEmpty.visibility = if (empty) View.VISIBLE else View.GONE rv.visibility = if (empty) View.GONE else View.VISIBLE -- cgit v1.2.3