Skip to content

Commit 2790c8a

Browse files
chore(deps): bump org.jetbrains.kotlin.android from 1.9.25 to 2.1.21 (#82)
* chore(deps): bump org.jetbrains.kotlin.android from 1.9.25 to 2.1.21 Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.9.25 to 2.1.21. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.9.25...v2.1.21) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.android dependency-version: 2.1.21 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * refactor: move `ONE_MEGA_PIXEL` constant to top-level --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Naveen Singh <snaveen935@gmail.com>
1 parent 7cba7db commit 2790c8a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/src/main/kotlin/org/fossify/camera/models/VideoQuality.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import androidx.annotation.DrawableRes
55
import androidx.annotation.IdRes
66
import org.fossify.camera.R
77

8+
private const val ONE_MEGA_PIXEL = 1000000
9+
810
enum class VideoQuality(val width: Int, val height: Int) {
911
UHD(3840, 2160),
1012
FHD(1920, 1080),
@@ -14,7 +16,7 @@ enum class VideoQuality(val width: Int, val height: Int) {
1416
val pixels: Int = width * height
1517

1618
val megaPixels: String =
17-
String.format("%.1f", (width * height.toFloat()) / VideoQuality.ONE_MEGA_PIXEL)
19+
String.format("%.1f", (width * height.toFloat()) / ONE_MEGA_PIXEL)
1820

1921
val ratio = width / height.toFloat()
2022

@@ -74,8 +76,4 @@ enum class VideoQuality(val width: Int, val height: Int) {
7476
fun toResolutionOption(): ResolutionOption {
7577
return ResolutionOption(buttonViewId = getButtonId(), imageDrawableResId = getImageResId())
7678
}
77-
78-
companion object {
79-
private const val ONE_MEGA_PIXEL = 1000000
80-
}
8179
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
#jetbrains
3-
kotlin = "1.9.25"
3+
kotlin = "2.1.21"
44
#Detekt
55
detekt = "1.23.8"
66
#Androidx

0 commit comments

Comments
 (0)