Skip to content

Commit

Permalink
fix problem with promotions
Browse files Browse the repository at this point in the history
[FIXED] - Sometimes can happen that if the promotion ends, the promotion is still show
  • Loading branch information
Brankale authored Jun 22, 2019
1 parent f6e821a commit bd95390
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/com/gamestop/android/gamestopapp/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ private boolean updatePromos(Element bonusBlock) {
bonusBlock = bonusBlock.getElementById("bonusBlock");

if (bonusBlock == null) {
promo = null;
return changes;
}
}
Expand Down Expand Up @@ -700,12 +701,14 @@ public ArrayList<String> update() throws IOException {

}

// UPDATE PROMOS
if ( updatePromos(body) == true ){
if ( hasPromo() == true && promo == false ){
notifications.add("Il gioco è in promozione");
}
}

// save changes
try {
DirectoryManager.exportGame(this);
} catch (Exception e) {
Expand Down

0 comments on commit bd95390

Please sign in to comment.