From 71563369f7b8bc6792a39691aa5c78cb99b7cca0 Mon Sep 17 00:00:00 2001 From: Igor Bubelov Date: Fri, 16 Feb 2024 16:45:46 +0700 Subject: [PATCH] Fix crash on community element click --- app/src/main/kotlin/area/AreaAdapter.kt | 2 +- app/src/main/kotlin/element/AreaElement.kt | 2 +- app/src/main/kotlin/element/ElementQueries.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/area/AreaAdapter.kt b/app/src/main/kotlin/area/AreaAdapter.kt index de1d6d85..a55ef966 100644 --- a/app/src/main/kotlin/area/AreaAdapter.kt +++ b/app/src/main/kotlin/area/AreaAdapter.kt @@ -102,7 +102,7 @@ class AreaAdapter( ) : Item() data class Element( - val id: String, + val id: Long, val iconId: String, val name: String, val status: String, diff --git a/app/src/main/kotlin/element/AreaElement.kt b/app/src/main/kotlin/element/AreaElement.kt index 62790300..5663c520 100644 --- a/app/src/main/kotlin/element/AreaElement.kt +++ b/app/src/main/kotlin/element/AreaElement.kt @@ -3,7 +3,7 @@ package element import org.json.JSONArray data class AreaElement( - val id: String, + val id: Long, val lat: Double, val lon: Double, val icon: String, diff --git a/app/src/main/kotlin/element/ElementQueries.kt b/app/src/main/kotlin/element/ElementQueries.kt index 870cca83..7916d6e3 100644 --- a/app/src/main/kotlin/element/ElementQueries.kt +++ b/app/src/main/kotlin/element/ElementQueries.kt @@ -273,7 +273,7 @@ class ElementQueries(private val db: SQLiteOpenHelper) { buildList { while (cursor.moveToNext()) { this += AreaElement( - id = cursor.getString(0), + id = cursor.getLong(0), lat = cursor.getDouble(1), lon = cursor.getDouble(2), icon = cursor.getString(3),