Compare commits

..

5 Commits
2.0.0 ... 2.0.1

Author SHA1 Message Date
johan12345
3386092bf8 Revert "update AGP"
This reverts commit abf9165602.
2025-09-21 22:45:00 +02:00
johan12345
1318126780 Release 2.0.1 2025-09-21 22:35:04 +02:00
johan12345
abf9165602 update AGP 2025-09-21 22:35:04 +02:00
johan12345
2c35df6360 fix #390 2025-09-21 22:23:21 +02:00
johan12345
4ed046df7a trigger website update after release 2025-09-21 17:34:56 +02:00
6 changed files with 27 additions and 10 deletions

View File

@@ -119,3 +119,13 @@ jobs:
asset_path: licenses_fossNormalRelease_appning.csv
asset_name: licenses_fossNormalRelease_appning.csv
asset_content_type: text/csv
- name: Trigger Website update
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ev-map/ev-map.github.io/dispatches \
-d "{\"event_type\": \"trigger-workflow\"}"

View File

@@ -21,8 +21,8 @@ android {
minSdk = 21
targetSdk = 36
// NOTE: always increase versionCode by 2 since automotive flavor uses versionCode + 1
versionCode = 262
versionName = "2.0.0"
versionCode = 264
versionName = "2.0.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

View File

@@ -69,8 +69,11 @@ abstract class ChargeLocationsDao {
@Query("DELETE FROM chargelocation WHERE NOT EXISTS (SELECT 1 FROM favorite WHERE favorite.chargerId = chargelocation.id)")
abstract suspend fun deleteAllIfNotFavorite()
@Query("DELETE FROM chargelocation WHERE dataSource == :dataSource AND id NOT IN (:chargerIds)")
abstract suspend fun deleteIdNotIn(dataSource: String, chargerIds: List<Long>)
@Query("SELECT id FROM chargelocation WHERE dataSource == :dataSource")
abstract suspend fun getAllIds(dataSource: String): List<Long>
@Query("DELETE FROM chargelocation WHERE dataSource == :dataSource AND id IN (:chargerIds)")
abstract suspend fun deleteById(dataSource: String, chargerIds: List<Long>)
@Query("SELECT * FROM chargelocation WHERE dataSource == :dataSource AND id == :id AND isDetailed == 1 AND timeRetrieved > :after")
abstract suspend fun getChargeLocationById(
@@ -706,7 +709,7 @@ class ChargeLocationsRepository(
val result = api.fullDownload()
try {
var insertJob: Job? = null
val chargerIds = mutableListOf<Long>()
val idsToDelete = chargeLocationsDao.getAllIds(api.id).toMutableSet()
result.chargers.chunked(1024).forEach {
insertJob?.join()
insertJob = withContext(Dispatchers.IO) {
@@ -714,11 +717,11 @@ class ChargeLocationsRepository(
chargeLocationsDao.insert(*it.toTypedArray())
}
}
chargerIds.addAll(it.map { it.id })
idsToDelete.removeAll(it.map { it.id })
fullDownloadProgress.value = result.progress
}
// delete chargers that have been removed
chargeLocationsDao.deleteIdNotIn(api.id, chargerIds)
chargeLocationsDao.deleteById(api.id, idsToDelete.toList())
val region = Mbr(
-180.0,

View File

@@ -23,7 +23,7 @@ class UpdateFullDownloadWorker(appContext: Context, workerParams: WorkerParamete
var insertJob: Job? = null
val result = api.fullDownload()
val chargerIds = mutableListOf<Long>()
val idsToDelete = chargeLocations.getAllIds(api.id).toMutableSet()
result.chargers.chunked(1024).forEach {
insertJob?.join()
insertJob = withContext(Dispatchers.IO) {
@@ -31,11 +31,11 @@ class UpdateFullDownloadWorker(appContext: Context, workerParams: WorkerParamete
chargeLocations.insert(*it.toTypedArray())
}
}
chargerIds.addAll(it.map { it.id })
idsToDelete.removeAll(it.map { it.id })
}
// delete chargers that have been removed
chargeLocations.deleteIdNotIn(api.id, chargerIds)
chargeLocations.deleteById(api.id, idsToDelete.toList())
when (api) {
is OpenStreetMapApiWrapper -> {

View File

@@ -0,0 +1,2 @@
Fehler behoben:
- Absturz behoben

View File

@@ -0,0 +1,2 @@
Bugfixes:
- Fixed crash