Compare commits

...

6 Commits
1.6.5 ... 1.6.6

Author SHA1 Message Date
johan12345
94842954e3 Release 1.6.6 2023-07-16 11:23:10 +02:00
johan12345
1bee5f7e13 upgrade Coil to 2.4.0 2023-07-16 11:22:02 +02:00
johan12345
d636cde70e EnBwAvailabilityDetector: zoom in until no markers are grouped 2023-07-14 19:25:53 +02:00
johan12345
2a4497fe7a fix NPE in EnBwAvailabilityDetector 2023-07-14 19:23:57 +02:00
johan12345
10e3287d82 fix division by zero error 2023-07-14 18:48:26 +02:00
Johan von Forstner
a0f7a389c8 CI: fix file name 2023-07-13 21:52:45 +02:00
6 changed files with 24 additions and 17 deletions

View File

@@ -82,6 +82,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/fossAutomotive/release/app-google-automotive-release.apk
asset_path: app/build/outputs/apk/fossAutomotive/release/app-foss-automotive-release.apk
asset_name: app-foss-automotive-release.apk
asset_content_type: application/vnd.android.package-archive

View File

@@ -21,8 +21,8 @@ android {
minSdkVersion 21
targetSdkVersion 33
// NOTE: always increase versionCode by 2 since automotive flavor uses versionCode + 1
versionCode 190
versionName "1.6.5"
versionCode 192
versionName "1.6.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resConfigs supportedLocales.split(',')
@@ -186,7 +186,7 @@ dependencies {
implementation 'com.squareup.moshi:moshi-kotlin:1.15.0'
implementation 'com.squareup.moshi:moshi-adapters:1.15.0'
implementation 'com.markomilos.jsonapi:jsonapi-retrofit:1.1.0'
implementation 'io.coil-kt:coil:1.1.0'
implementation 'io.coil-kt:coil:2.4.0'
implementation 'com.github.ev-map:StfalconImageViewer:5082ebd392'
implementation "com.mikepenz:aboutlibraries-core:$about_libs_version"
implementation "com.mikepenz:aboutlibraries:$about_libs_version"

View File

@@ -105,16 +105,18 @@ class EnBwAvailabilityDetector(client: OkHttpClient, baseUrl: String? = null) :
var markers =
api.getMarkers(lng - coordRange, lng + coordRange, lat - coordRange, lat + coordRange)
markers = markers.flatMap {
if (it.grouped) {
api.getMarkers(
it.viewPort.lowerLeftLon,
it.viewPort.upperRightLon,
it.viewPort.lowerLeftLat,
it.viewPort.upperRightLat
)
} else {
listOf(it)
while (markers.any { it.grouped }) {
markers = markers.flatMap {
if (it.grouped) {
api.getMarkers(
it.viewPort.lowerLeftLon,
it.viewPort.upperRightLon,
it.viewPort.lowerLeftLat,
it.viewPort.upperRightLat
)
} else {
listOf(it)
}
}
}
@@ -149,9 +151,9 @@ class EnBwAvailabilityDetector(client: OkHttpClient, baseUrl: String? = null) :
markers = listOf(nearest)
}
val details = markers.map {
val details = markers.mapNotNull { it.stationId }.map {
// load details
api.getLocation(it.stationId!!)
api.getLocation(it)
}
val connectorStatus = details.flatMap { it.chargePoints }.flatMap { cp ->

View File

@@ -151,8 +151,9 @@ class BarGraphView(context: Context, attrs: AttributeSet) : View(context, attrs)
legendPaint.textAlign = Paint.Align.CENTER
data.entries.forEachIndexed { i, (t, v) ->
val divisor = maxValue.toFloat().takeIf { it > 0f } ?: 1f
val height =
zeroHeight + (graphBounds.height() - zeroHeight) * v.toFloat() / maxValue.toFloat()
zeroHeight + (graphBounds.height() - zeroHeight) * v.toFloat() / divisor
val left = graphBounds.left + (barWidth + barMargin) * i
if (left + barWidth > graphBounds.right) return@forEachIndexed

View File

@@ -0,0 +1,2 @@
Fehler behoben:
- Abstürze behoben

View File

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