mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix missing data class after merge
This commit is contained in:
+6
@@ -18,6 +18,12 @@ package io.element.android.features.location.api
|
|||||||
|
|
||||||
private const val GEO_URI_REGEX = """geo:(?<latitude>-?\d+(?:\.\d+)?),(?<longitude>-?\d+(?:\.\d+)?)(?:;u=(?<uncertainty>\d+(?:\.\d+)?))?"""
|
private const val GEO_URI_REGEX = """geo:(?<latitude>-?\d+(?:\.\d+)?),(?<longitude>-?\d+(?:\.\d+)?)(?:;u=(?<uncertainty>\d+(?:\.\d+)?))?"""
|
||||||
|
|
||||||
|
data class Location(
|
||||||
|
val lat: Double,
|
||||||
|
val lon: Double,
|
||||||
|
val accuracy: Float,
|
||||||
|
)
|
||||||
|
|
||||||
fun parseGeoUri(geoUri: String): Location? {
|
fun parseGeoUri(geoUri: String): Location? {
|
||||||
val result = Regex(GEO_URI_REGEX).matchEntire(geoUri) ?: return null
|
val result = Regex(GEO_URI_REGEX).matchEntire(geoUri) ?: return null
|
||||||
return Location (
|
return Location (
|
||||||
|
|||||||
Reference in New Issue
Block a user