Skip to content

Commit e520f0e

Browse files
committed
Corrections by Sylvia, Thanks.
1 parent 302fee0 commit e520f0e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/src/main/java/protect/card_locker/BarcodeImageWriterTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
9292
} else {
9393
// Scale down the image to reduce the memory needed to produce it
9494
imageWidth = Math.min(MAX_WIDTH, this.mContext.getResources().getDisplayMetrics().widthPixels);
95-
double ratio = (double) MAX_WIDTH / (double) imageViewWidth;
95+
double ratio = (double) imageWidth / (double) imageViewWidth;
9696
imageHeight = (int) (imageViewHeight * ratio);
9797
}
9898

app/src/main/java/protect/card_locker/DBHelper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,8 @@ public static boolean updateLoyaltyCardZoomLevel(SQLiteDatabase database, int lo
533533
int rowsUpdated = database.update(LoyaltyCardDbIds.TABLE, contentValues,
534534
whereAttrs(LoyaltyCardDbIds.ID),
535535
withArgs(loyaltyCardId));
536-
Log.d("updateLoyaltyCardZLevel", "Rows changed = " + rowsUpdated);
537-
Log.d("updateLoyaltyCardZoomLW", "Rows changed = " + rowsUpdated);
538-
return (rowsUpdated == 2);
536+
Log.d("updateLoyaltyCardZLevel", "Card Id = " + loyaltyCardId + " Zoom level = " + zoomLevel + " Zoom level width = " + zoomLevelWidth);
537+
return (rowsUpdated >= 1);
539538
}
540539

541540
public static boolean updateLoyaltyCardBalance(SQLiteDatabase database, final int id, final BigDecimal newBalance) {

0 commit comments

Comments
 (0)