Fix cancellazione colli in fase di recupero non andato a buon fine

This commit is contained in:
Giuseppe Scorrano 2019-12-12 17:47:26 +01:00
parent c4898f59f4
commit 2d0bbf4b53
2 changed files with 2 additions and 11 deletions

View File

@ -105,16 +105,6 @@ public class ColliDataRecover {
return mtbColtsSessions.size() > 0; return mtbColtsSessions.size() > 0;
} }
public static Integer getFirstSessionID() {
if(thereIsAnExistantSession()){
return 0;
} else return null;
}
public static List<Integer> getAllSessionIDs() { public static List<Integer> getAllSessionIDs() {
if(thereIsAnExistantSession()) { if(thereIsAnExistantSession()) {

View File

@ -155,8 +155,9 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
cyclicRecover(sessionsIterator, onComplete, onFailed); cyclicRecover(sessionsIterator, onComplete, onFailed);
}, ex -> { }, ex -> {
if(ex.getMessage().contains("Dati collo non corretti")) { if(ex.getMessage().contains("Dati collo non corretti") || (ex.getMessage().contains("Il collo numero") && ex.getMessage().contains("non esiste"))) {
ColliDataRecover.closeSession(recoveredMtbColtID); ColliDataRecover.closeSession(recoveredMtbColtID);
onFailed.run(ex);
} else { } else {
onFailed.run(ex); onFailed.run(ex);
} }