Skip to content

Commit

Permalink
Fix several SonarCloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyDL-Infomaniak committed Jul 22, 2024
1 parent 5125ac7 commit a4c787d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.infomaniak.lib.confetti
import com.infomaniak.lib.confetti.confetto.Confetto
import java.util.Random

interface ConfettoGenerator {
fun interface ConfettoGenerator {
/**
* Generate a random confetto to animate.
*
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/infomaniak/lib/core/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ object Utils {

@SuppressLint("SourceLockedOrientationActivity")
fun Activity.lockOrientationForSmallScreens() {
val (screenHeightInches, screenWidthInches) = with(resources.displayMetrics) { (heightPixels / ydpi) to (widthPixels / xdpi) }
val (screenHeightInches, screenWidthInches) = with(resources.displayMetrics) {
(heightPixels / ydpi) to (widthPixels / xdpi)
}

val aspectRatio = resources.configuration.screenLayout and Configuration.SCREENLAYOUT_LONG_MASK
val isLongScreen = aspectRatio != Configuration.SCREENLAYOUT_LONG_NO
Expand Down

0 comments on commit a4c787d

Please sign in to comment.