From 5f2bf26bc2cbdfbce76c03ff05c8d8ef027c8a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20H=C3=B6gberg?= Date: Wed, 13 Nov 2024 00:17:10 +0100 Subject: [PATCH] Fix current/voltage mixup for merged Chargepoints (#365) --- app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt b/app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt index 7967b3753..2329e5d9c 100644 --- a/app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt +++ b/app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt @@ -131,8 +131,8 @@ data class ChargeLocation( .filter { it.type == variant.type && it.power == variant.power } val count = filtered.sumOf { it.count } Chargepoint(variant.type, variant.power, count, - filtered.map { it.voltage }.distinct().singleOrNull(), - filtered.map { it.current }.distinct().singleOrNull() + filtered.map { it.current }.distinct().singleOrNull(), + filtered.map { it.voltage }.distinct().singleOrNull() ) } }