From 4001e8d094b608104112b429276422b258e6b170 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 16 Apr 2018 02:42:47 +0200 Subject: [PATCH] Fix multiple summary generation --- .../coinfolio/Activities/HomeActivityFragments/Summary.java | 6 ++++-- .../nauk/coinfolio/DataManagers/CurrencyData/Currency.java | 1 + .../nauk/coinfolio/LayoutManagers/HomeLayoutGenerator.java | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivityFragments/Summary.java b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivityFragments/Summary.java index 090f8f4..37520cc 100644 --- a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivityFragments/Summary.java +++ b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivityFragments/Summary.java @@ -135,7 +135,7 @@ public class Summary extends Fragment { } }); - updateTitle(); + //updateTitle(); updateAll(true); @@ -495,7 +495,8 @@ public class Summary extends Fragment { protected void onPostExecute(Void result) { refreshLayout.setRefreshing(false); - refreshCurrencyList(); + //refreshCurrencyList(); + adaptView(); handler.removeCallbacks(updateRunnable); } } @@ -632,6 +633,7 @@ public class Summary extends Fragment { @Override public void onSuccess(Currency currency) { countCoins(true, false); + Log.d("coinfolio", "History " + currency.getSymbol()); } }); } diff --git a/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java b/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java index 2f6ea8e..ceb0ab1 100644 --- a/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java +++ b/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java @@ -111,6 +111,7 @@ public class Currency implements Parcelable { } else { + Log.d("coinfolio", "Error for : " + symbol); value = NULL; } diff --git a/app/src/main/java/com/nauk/coinfolio/LayoutManagers/HomeLayoutGenerator.java b/app/src/main/java/com/nauk/coinfolio/LayoutManagers/HomeLayoutGenerator.java index 223b62b..c075295 100644 --- a/app/src/main/java/com/nauk/coinfolio/LayoutManagers/HomeLayoutGenerator.java +++ b/app/src/main/java/com/nauk/coinfolio/LayoutManagers/HomeLayoutGenerator.java @@ -253,7 +253,6 @@ public class HomeLayoutGenerator { List dataChartList = currency.getHistoryMinutes(); ArrayList values = new ArrayList<>(); - Log.d("coinfolio", "Generating data for " + currency.getSymbol()); for(int i = 0; i < dataChartList.size(); i+=10) { values.add(new Entry(i, (float) dataChartList.get(i).getOpen()));