From 4bdffe22c42e3c34cd1b44981bead86de4fca07b Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Wed, 15 Aug 2018 22:37:43 +0200 Subject: [PATCH] Fix negative balance not displaying --- .../moodl/Activities/HomeActivityFragments/Summary.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java index cc11def..69fca07 100644 --- a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java +++ b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java @@ -207,7 +207,6 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface, layoutRefresherRunnable = new Runnable() { @Override public void run() { - final List currencyView = new ArrayList<>(); final List renderedCurrencies = new ArrayList<>(); if (balanceManager.getTotalBalance() != null) @@ -215,7 +214,7 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface, for (int i = 0; i < balanceManager.getTotalBalance().size(); i++) { final Currency currency = balanceManager.getTotalBalance().get(i); - if (!currency.getSymbol().equals("USD") && ((currency.getBalance() * currency.getValue()) >= preferencesManager.getMinimumAmount())) { + if (!currency.getSymbol().equals("USD") && (Math.abs(currency.getBalance() * currency.getValue()) >= preferencesManager.getMinimumAmount())) { //currencyView.add(layoutGenerator.getInfoLayout(currency, totalValue, preferencesManager.isBalanceHidden())); renderedCurrencies.add(currency); }