Skip to content

πŸ› Hotfix 2.4.1: distance sorting, search text, native ad media - #28

Merged
ngapp-dev merged 5 commits into
masterfrom
hotfix/2.4.1
Oct 2, 2026
Merged

ngapp-dev merged 5 commits into
masterfrom
hotfix/2.4.1

Conversation

@ngapp-dev

@ngapp-dev ngapp-dev commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

🧭 Distance sorting is back

  • "Distance" is selectable again in the stations sort dialog and is saved in preferences (it was silently mapped to "Name").
  • Stations are sorted by distance in the repository, since only it knows the user's position. Ascending and descending both work, the list re-sorts when the location changes, and stations with an unknown distance go last.
  • The DAO orders by title for distance sorting too, so the list stays stable while the location is unknown (it was ordered by NULL).
  • Fix: distanceInKm returned NaN when the user stands exactly at a station (rounding pushed the cosine past 1), which would show "NaN km" and break the sort.

πŸ” Invisible search text

  • The search field drew its text with colorScheme.onBackground. In this palette that is the background/card color (white in the light theme, dark in the dark theme), so typed text vanished in both themes. It now uses the typography's text color. All search screens share this field.

πŸ“’ AdMob native ad media view

  • When an AdMob ad had an icon, the row showed the icon in a 74x66 thumbnail and hid the registered MediaView. The AdMob validator reported it as 0x0: "media views smaller than 120x120 will be demonetized".
  • The thumbnail is now always the ad's media at 120x120, as it already was for Yandex. The icon moves to the small slot next to the "Ad" label. Android and iOS.

πŸ”– Version

  • Android 2.4.0 β†’ 2.4.1 (versionCode 2401).
  • iOS 1.1.0 (3) β†’ 1.1.1 (4), app and widget extension.

Review notes

  • Users who never changed the station sorting now get distance by default, because DISTANCE = 0 is the proto default.
  • AdMob rows with an icon are now taller than a regular list row; the 120x120 media minimum requires it.
  • Verified on the Android emulator: distance order, search text in light and dark themes, AdMob validator "No implementation issues found". The iOS app builds; not checked on a device.
  • Tests: distance sorting (asc, desc, unknown location, re-sort on a location change), DAO fallback order, the NaN case.

ngapps added 5 commits October 3, 2026 00:46
- "Distance" is selectable again in the stations sort dialog and is
  stored in preferences (it was mapped to "Name").
- The repository sorts by distance in memory, since only it knows the
  user's position; ascending/descending both work, the list re-sorts as
  the location changes, and stations with an unknown distance go last.
- The DAO orders by title for DISTANCE too, so the list stays stable
  while the location is unknown (it was ordered by NULL).

Fix: distanceInKm returned NaN when the user stands exactly at a
station (rounding pushed the cosine past 1).

Tests: distance sorting (asc, desc, unknown location, re-sort on a
location change), DAO fallback order, the NaN case.
The search field drew its text with colorScheme.onBackground, which in
this palette is the background/card color (white in light theme, dark in
dark), so typed text vanished in both themes. It now uses the
typography's text color.
When an AdMob ad had an icon, the row showed the icon in a 74x66
thumbnail and hid the registered MediaView, which the AdMob validator
reports as 0x0 ("media views smaller than 120x120 will be
demonetized"). The thumbnail is now always the ad's media at 120x120
(as with Yandex), and the icon moves to the small slot next to the "Ad"
label. Android and iOS.
- Android 2.4.0 -> 2.4.1 (versionCode 2401).
- iOS app 1.1.0 (3) -> 1.1.1 (4); the widget extension gets the same
  version and build.
@ngapp-dev
ngapp-dev merged commit 91248ba into master Oct 2, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant