Skip to content

Commit

Permalink
#105 changed items removal from to buy screen not to save buy date, w…
Browse files Browse the repository at this point in the history
…hen they are not checked
  • Loading branch information
bugy committed Apr 22, 2017
1 parent 67008db commit 8375cb2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,11 @@ public void added(ShopItem item) {
public void removed(ShopItem item) {
dataStorage.removeShopItem(item);

final Product product = item.getProduct();
product.setLastBuyDate(new Date());
dataStorage.saveProduct(product);
if (item.isChecked()) {
final Product product = item.getProduct();
product.setLastBuyDate(new Date());
dataStorage.saveProduct(product);
}
}

@Override
Expand Down

0 comments on commit 8375cb2

Please sign in to comment.