Skip to content

Commit a95f5ce

Browse files
committed
Fixed img comparison
1 parent a429b85 commit a95f5ce

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -595,23 +595,7 @@ public static boolean isDuplicate(Context context, final LoyaltyCard a, final Lo
595595
b.barcodeType == null ? null : b.barcodeType.format()) && // nullable CatimaBarcode with no overridden .equals(), so we need to check .format()
596596
Utils.equals(a.headerColor, b.headerColor) && // nullable Integer
597597
a.starStatus == b.starStatus && // non-nullable int
598-
a.archiveStatus == b.archiveStatus && // non-nullable int
599-
nullableBitmapsEqual(a.getImageThumbnail(context), b.getImageThumbnail(context)) && // nullable Bitmap
600-
nullableBitmapsEqual(a.getImageFront(context), b.getImageFront(context)) && // nullable Bitmap
601-
nullableBitmapsEqual(a.getImageBack(context), b.getImageBack(context)); // nullable Bitmap
602-
}
603-
604-
public static boolean nullableBitmapsEqual(@Nullable Bitmap a, @Nullable Bitmap b) {
605-
if (a == null && b == null) {
606-
return true;
607-
}
608-
609-
if (a != null && b != null) {
610-
return a.sameAs(b);
611-
}
612-
613-
// One is null and the other isn't, so it's not equal
614-
return false;
598+
a.archiveStatus == b.archiveStatus; // non-nullable int
615599
}
616600

617601
@NonNull

0 commit comments

Comments
 (0)