Skip to content

Commit

Permalink
Bugs fixed in worker
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoLuna5 committed Aug 22, 2020
1 parent 76bcde0 commit d6dab59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file added APK/app.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.icu.text.NumberFormat;
import android.media.RingtoneManager;
import android.util.Log;

Expand Down Expand Up @@ -65,7 +66,7 @@ public void onResponse(Call<ProductML> call, Response<ProductML> response) {

String price = String.valueOf(response.body().getPrice());

if (!product.getPrice().equals(price)){
if (Integer.parseInt(product.getPrice().replaceAll(",", "")) != Integer.parseInt(price.replaceAll(",", ""))){
db.createPrice(product.getId(), price);
db.updateProduct("status", response.body().getStatus(), String.valueOf(product.getId()));
sendNotification(product.getName(), "Tu producto "+product.getName()+" ha cambiado de precio, su precio ahora es "+price);
Expand Down

0 comments on commit d6dab59

Please sign in to comment.