From f3dcbe024370ce8dc330d4b9c260d4a3828e3a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heinrich=20Kie=C3=9Fling?= Date: Wed, 24 Nov 2021 09:10:21 +0100 Subject: [PATCH] #34: divide rest among blanks - should not consider zero as blank 0 payment means, the participant should not be considered for that specific payment. Split evenly should hence skip this entry as well and only split among the actual blanks aka "" or null. --- .../christian/trickytripper/activities/PaymentEditActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/de/koelle/christian/trickytripper/activities/PaymentEditActivity.java b/app/src/main/java/de/koelle/christian/trickytripper/activities/PaymentEditActivity.java index 3428829..55fd775 100644 --- a/app/src/main/java/de/koelle/christian/trickytripper/activities/PaymentEditActivity.java +++ b/app/src/main/java/de/koelle/christian/trickytripper/activities/PaymentEditActivity.java @@ -459,7 +459,7 @@ public void divideRest(View view) { int countBlanks = 0; List participantsWithBlanks = new ArrayList<>(); for (Entry entry : payment.getParticipantToSpending().entrySet()) { - if (entry.getValue().getValue() == null || entry.getValue().getValue() == 0) { + if (entry.getValue().getValue() == null) { countBlanks = countBlanks + 1; participantsWithBlanks.add(entry.getKey()); }