From 379aa1d77ceaa8a182cd18d5f4cdb601a3824001 Mon Sep 17 00:00:00 2001 From: Vasily Laushkin Date: Fri, 29 Jul 2022 23:14:30 +0300 Subject: [PATCH] update kotlin version --- build.gradle | 2 +- .../main/java/io/fotoapparat/selector/ResolutionSelectors.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 54d3c03a..f6a6ae19 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ subprojects { buildscript { ext { versions = [ - kotlin : '1.3.50', + kotlin : '1.7.10', code : 1, name : '1.0.0', sdk : [ diff --git a/fotoapparat/src/main/java/io/fotoapparat/selector/ResolutionSelectors.kt b/fotoapparat/src/main/java/io/fotoapparat/selector/ResolutionSelectors.kt index 1d534b03..665d145f 100644 --- a/fotoapparat/src/main/java/io/fotoapparat/selector/ResolutionSelectors.kt +++ b/fotoapparat/src/main/java/io/fotoapparat/selector/ResolutionSelectors.kt @@ -7,9 +7,9 @@ typealias ResolutionSelector = Iterable.() -> Resolution? /** * @return Selector function which always provides the biggest resolution. */ -fun highestResolution(): ResolutionSelector = { maxBy(Resolution::area) } +fun highestResolution(): ResolutionSelector = { maxByOrNull(Resolution::area) } /** * @return Selector function which always provides the smallest resolution. */ -fun lowestResolution(): ResolutionSelector = { minBy(Resolution::area) } \ No newline at end of file +fun lowestResolution(): ResolutionSelector = { minByOrNull(Resolution::area) } \ No newline at end of file