WaypointEditRequest

class WaypointEditRequest(val waypoint: Waypoint, val onSend: (Waypoint) -> Unit, val onDelete: (Waypoint) -> Unit, val onDismiss: () -> Unit, val onBeginBoxAuthoring: (Waypoint) -> Unit)(source)

A waypoint the map is asking its host to present an editor for.

The map owns everything except the editor itself: it decides when to ask, assigns a packet id and default icon, and performs the send or delete. All the host has to do is show a dialog and call back.

The editor is a slot so a host can substitute its own, but it no longer has to supply one: EditWaypointDialog builds for every target since its expiry picker moved from android.app.DatePickerDialog to Material 3's, so the provider defaults to it and desktop creates waypoints like anything else.

Constructors

Link copied to clipboard
constructor(waypoint: Waypoint, onSend: (Waypoint) -> Unit, onDelete: (Waypoint) -> Unit, onDismiss: () -> Unit, onBeginBoxAuthoring: (Waypoint) -> Unit)

Properties

Link copied to clipboard
val onBeginBoxAuthoring: (Waypoint) -> Unit

Hands the draft back so the user can define its geofence bounding box by tapping the map, which only the map can offer. The editor closes; the map re-opens it with the box applied. EditWaypointDialog has taken this callback all along — the F-Droid host simply never passed it, so the button did nothing.

Link copied to clipboard
val onDelete: (Waypoint) -> Unit
Link copied to clipboard
val onDismiss: () -> Unit
Link copied to clipboard
val onSend: (Waypoint) -> Unit
Link copied to clipboard
val waypoint: Waypoint

The waypoint to edit. A new one carries id == 0 and only its coordinates.