- Unifies Location Flows and GeoHash Flows into one

- Make them react to changing location permissions
- Adds UI for when the location permission is rejected.
This commit is contained in:
Vitor Pamplona
2024-11-11 17:51:42 -05:00
parent 062e4af118
commit 37a92c25f0
10 changed files with 193 additions and 60 deletions

View File

@@ -280,7 +280,13 @@ open class Event(
return PoWRank.getCommited(id, commitedPoW)
}
override fun getGeoHash(): String? = tags.firstOrNull { it.size > 1 && it[0] == "g" }?.get(1)?.ifBlank { null }
override fun getGeoHash(): String? =
tags
.filter { it.size > 1 && it[0] == "g" }
.maxByOrNull {
it[1].length
}?.get(1)
?.ifBlank { null }
override fun getReward(): BigDecimal? =
try {