From 45468f6469dc997ed2812d4f1af5d64da084c755 Mon Sep 17 00:00:00 2001 From: Schoumi Date: Fri, 4 Aug 2017 18:38:33 +0200 Subject: [PATCH] Fix some bug and error Fixes #4 --- .../java/fr/mobdev/lpcprog/fragment/FlashFragment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/fr/mobdev/lpcprog/fragment/FlashFragment.java b/app/src/main/java/fr/mobdev/lpcprog/fragment/FlashFragment.java index aa9defd..081ca1b 100644 --- a/app/src/main/java/fr/mobdev/lpcprog/fragment/FlashFragment.java +++ b/app/src/main/java/fr/mobdev/lpcprog/fragment/FlashFragment.java @@ -123,10 +123,13 @@ public class FlashFragment extends Fragment{ progressBar.setVisibility(View.GONE); updateProgress(0); flash_infoStr += getString(R.string.ok)+"\n"; + flash_infoStr += getString(R.string.flash_succeed); flash_info.setText(flash_infoStr); TextView step = v.findViewById(R.id.flash_steps); step.setVisibility(View.GONE); + previousStep = 0; + previousId = 0; } }); } @@ -147,10 +150,6 @@ public class FlashFragment extends Fragment{ TextView stepV = v.findViewById(R.id.flash_steps); stepV.setVisibility(View.VISIBLE); stepV.setText(getString(R.string.step)+" "+step+"/"+endStep+" "+getString(step_res_id)); - if(step == previousStep) { - previousStep = 0; - previousId = 0; - } } updateProgress(progress); } @@ -170,6 +169,8 @@ public class FlashFragment extends Fragment{ progressBar.setVisibility(View.GONE); TextView step = v.findViewById(R.id.flash_steps); step.setVisibility(View.GONE); + previousId = 0; + previousStep = 0; } }); }