|
@@ -47,6 +47,7 @@ import logcat.LogPriority
|
|
|
import uy.kohesive.injekt.Injekt
|
|
|
import uy.kohesive.injekt.api.get
|
|
|
import java.io.File
|
|
|
+import kotlin.math.max
|
|
|
import kotlin.math.roundToInt
|
|
|
|
|
|
private const val TABLET_UI_MIN_SCREEN_WIDTH_DP = 720
|
|
@@ -162,8 +163,8 @@ fun Context.hasPermission(permission: String) = ContextCompat.checkSelfPermissio
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-val getDisplayHeightInPx: Int
|
|
|
- get() = Resources.getSystem().displayMetrics.heightPixels
|
|
|
+val getDisplayMaxHeightInPx: Int
|
|
|
+ get() = Resources.getSystem().displayMetrics.let { max(it.heightPixels, it.widthPixels) }
|
|
|
|
|
|
/**
|
|
|
* Converts to dp.
|