mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Convert wikidata/mwapi to kotlin (part 3) (#6004)
* Convert Edit to kotlin along with deleting unused class * Converted ExtMetadata to kotlin * Convert ImageInfo to kotlin * Removed unused class * Convert Notification to kotlin * Convert PageProperties to kotlin * Convert PageTitle to kotlin * Convert Namespace to kotlin
This commit is contained in:
parent
64354fb9e4
commit
015c5d5c63
22 changed files with 832 additions and 1133 deletions
|
|
@ -41,6 +41,13 @@ data class LatLng(
|
|||
* Accepts a non-null [Location] and converts it to a [LatLng].
|
||||
*/
|
||||
companion object {
|
||||
fun latLongOrNull(latitude: String?, longitude: String?): LatLng? =
|
||||
if (!latitude.isNullOrBlank() && !longitude.isNullOrBlank()) {
|
||||
LatLng(latitude.toDouble(), longitude.toDouble(), 0.0f)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the latitude and longitude of a given non-null location
|
||||
* @param location the non-null location of the user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue