commit
d20cf9d4bd
@ -22,9 +22,7 @@ public PhotoSize getPhoto(Update update) {
|
||||
|
||||
// We fetch the bigger photo
|
||||
return photos.stream()
|
||||
.sorted(Comparator.comparing(PhotoSize::getFileSize).reversed())
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
.max(Comparator.comparing(PhotoSize::getFileSize)).orElse(null);
|
||||
}
|
||||
|
||||
// Return null if not found
|
||||
|
Loading…
Reference in New Issue
Block a user