Refactor LiveLocationShare to include structured LastLocation
This commit is contained in:
parent
d6999b5334
commit
9ba8798175
3 changed files with 26 additions and 9 deletions
|
|
@ -15,8 +15,17 @@ import io.element.android.libraries.matrix.api.core.UserId
|
|||
data class LiveLocationShare(
|
||||
/** The user who is sharing their location. */
|
||||
val userId: UserId,
|
||||
/** The last known geo URI (e.g., "geo:51.5074,-0.1278"). */
|
||||
val lastGeoUri: String,
|
||||
/** The timestamp of the last location update. */
|
||||
val lastTimestamp: Long,
|
||||
/** The last known location if any. */
|
||||
val lastLocation: LastLocation?,
|
||||
/** The timestamp when location sharing ends, in milliseconds. */
|
||||
val endTimestamp: Long,
|
||||
)
|
||||
|
||||
data class LastLocation(
|
||||
/** The last known geo URI (e.g., "geo:51.5074,-0.1278"). */
|
||||
val geoUri: String,
|
||||
/** The timestamp of the last location update. */
|
||||
val timestamp: Long,
|
||||
/** The asset of the last location update. */
|
||||
val assetType: AssetType,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue