<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nav.git/android-app/app/src/main/kotlin/org/terst/nav/UnitPrefs.kt, branch main</title>
<subtitle>nav — android navigation app
</subtitle>
<id>https://git.terst.org/nav.git/atom?h=main</id>
<link rel='self' href='https://git.terst.org/nav.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/'/>
<updated>2026-07-02T02:56:25+00:00</updated>
<entry>
<title>fix+feat: layer cards, ocean floor, notifications, units, log, photos</title>
<updated>2026-07-02T02:56:25+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-07-02T02:56:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=80aa2531144563e8a117ffd81f6dd6d9af8bd574'/>
<id>urn:sha1:80aa2531144563e8a117ffd81f6dd6d9af8bd574</id>
<content type='text'>
Layer picker:
- Fix blank cards: app:layout_columnWeight → android:layout_columnWeight
  (GridLayout children require android: namespace for weight attributes)
- Add Distance unit chips (nm/km/mi) to UNITS section

Map layers:
- Fix ocean floor: use addLayerAbove(lastFillLayer) instead of addLayerAt(0)
  so base rasters appear above OFM water/land fills but below roads+labels
- CardView elevation 16dp→4dp to eliminate visible shadow border

Notifications:
- Add POST_NOTIFICATIONS to manifest
- Request it alongside location permissions on Android 13+ (TIRAMISU+)

Conditions sheet:
- showOverlay() now always hides bottom sheet (STATE_HIDDEN) so it can't
  leak onto non-map pages; bottom padding (80dp) added to Safety+Log panes

Log entries:
- Log entry form visible always (was only shown while recording)
- Photo-only events filtered from track timeline; photos appear only when
  paired with real text in a log entry

Anchor watch:
- Inputs and output radius now use configured depth unit (ft/m)
  with label updates and ft→m conversion before calculation

Photos:
- Tap thumbnail in track event log → fullscreen dialog viewer

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>refactor: extract GeoThrottle, fix fully-qualified refs, harden enum parsing</title>
<updated>2026-05-07T18:58:57+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-05-07T18:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=d8a53c3c9cba34dec7741395877a8dc87cebd0c5'/>
<id>urn:sha1:d8a53c3c9cba34dec7741395877a8dc87cebd0c5</id>
<content type='text'>
- Extract GeoThrottle inner class in MainViewModel; eliminates 6 state
  vars and duplicate throttle logic in loadConditions/loadWindGrid
- Fix android.util.Log.e and kotlin.math.* fully-qualified refs now that
  imports are present
- UnitPrefs: wrap valueOf() in runCatching to handle corrupt pref values
- VesselRepository.init: forEach { add() } → mapTo() for both lists
- TrackRepository: remove noisy cached-log else-branch that fired on
  every stopTrack() call

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: remove crash-risk !! operators in UnitPrefs and MainViewModel</title>
<updated>2026-05-06T07:39:55+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-05-06T07:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=29fb98a20923b1b04a126ca00a2c21448ed822d5'/>
<id>urn:sha1:29fb98a20923b1b04a126ca00a2c21448ed822d5</id>
<content type='text'>
UnitPrefs: getString() returns String? even with a non-null default,
so !! crashes on corrupted prefs. Replaced with explicit elvis fallback
to the same enum default.

MainViewModel: forecastResult.getOrThrow() is logically safe (when-branch
guards it) but unnecessarily brittle. Replaced with getOrNull() ?: emptyList().

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add unit settings, wind particles toggle, and recenter-to-top</title>
<updated>2026-04-10T16:27:42+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-04-10T16:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=bf57713ef0e378ebedd518f4fb243328de08179d'/>
<id>urn:sha1:bf57713ef0e378ebedd518f4fb243328de08179d</id>
<content type='text'>
- New UnitPrefs: persisted C/F, ft/m, hPa/inHg, kt/mph/kph — defaults to °F
- InstrumentHandler now accepts raw values (knots, metres, hPa, °C) and formats
  via UnitPrefs on every update
- LayerPickerSheet expanded with wind particles toggle and unit chip selectors;
  wrapped in ScrollView to handle the additional height
- MapLayerManager tracks particlesEnabled (persisted); setParticlesEnabled() added
- MainActivity: caches last raw values so refreshUnits() can reformat everything
  instantly when the user changes a unit without waiting for new sensor data
- Recenter button moved to top (below HUD strip) so it's never obscured by the
  bottom sheet or bottom nav
- Unit label TextViews given IDs in HUD and instrument sheet for live updates

https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX
</content>
</entry>
</feed>
