Merge branch 'devel' of github.com:nv95/Kotatsu into devel

This commit is contained in:
Koitharu
2022-05-20 12:16:22 +03:00
22 changed files with 114 additions and 26 deletions

View File

@@ -0,0 +1,15 @@
package org.koitharu.kotatsu.utils.ext
import android.content.Context
import android.os.Build
import android.view.Display
import android.view.WindowManager
import androidx.core.content.getSystemService
val Context.displayCompat: Display?
get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
display
} else {
@Suppress("DEPRECATION")
getSystemService<WindowManager>()?.defaultDisplay
}