From 85902aff645ad06f4e2e4d45dc3916716627a0d0 Mon Sep 17 00:00:00 2001 From: Eugene Date: Mon, 22 Jun 2026 21:01:28 +0300 Subject: [PATCH] revert isTv method --- .../ui/components/InsetLazyColumn.android.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/ui/src/androidMain/kotlin/ru/shadowsparky/ui/components/InsetLazyColumn.android.kt b/libs/ui/src/androidMain/kotlin/ru/shadowsparky/ui/components/InsetLazyColumn.android.kt index d28584f..b37399e 100644 --- a/libs/ui/src/androidMain/kotlin/ru/shadowsparky/ui/components/InsetLazyColumn.android.kt +++ b/libs/ui/src/androidMain/kotlin/ru/shadowsparky/ui/components/InsetLazyColumn.android.kt @@ -1,11 +1,14 @@ package ru.shadowsparky.ui.components +import android.app.UiModeManager +import android.content.Context +import android.content.res.Configuration import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext @Composable actual fun isTv(): Boolean { -// val context = LocalContext.current -// val uiModeManager = context.getSystemService(Context.UI_MODE_SERVICE) as UiModeManager -// return uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION - return true + val context = LocalContext.current + val uiModeManager = context.getSystemService(Context.UI_MODE_SERVICE) as UiModeManager + return uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION }