Fix split pane UI not showing after registration on large screen devices.

This commit is contained in:
jeffrey-signal
2025-12-09 10:34:23 -05:00
committed by Michelle Tang
parent 587c9cb46f
commit c33716c7b5
8 changed files with 9 additions and 63 deletions

View File

@@ -38,7 +38,6 @@ import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.layout.layout
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
@@ -103,21 +102,6 @@ fun AppScaffold(
contentWindowInsets: WindowInsets = WindowInsets.systemBars,
animatorFactory: AppScaffoldAnimationStateFactory = AppScaffoldAnimationStateFactory.Default
) {
val isForcedCompact = !LocalInspectionMode.current && !isLargeScreenSupportEnabled()
if (isForcedCompact) {
ListAndNavigation(
topBarContent = topBarContent,
listContent = secondaryContent,
navRailContent = navRailContent,
bottomNavContent = bottomNavContent,
contentWindowInsets = contentWindowInsets,
modifier = modifier
)
return
}
val minPaneWidth = navigator.scaffoldDirective.defaultPanePreferredWidth
val navigationState = navigator.state

View File

@@ -13,7 +13,6 @@ import androidx.window.core.layout.WindowHeightSizeClass
import androidx.window.core.layout.WindowSizeClass
import androidx.window.core.layout.WindowWidthSizeClass
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.util.RemoteConfig
val WindowSizeClass.listPaneDefaultPreferredWidth: Dp get() = if (windowWidthSizeClass.isAtLeast(WindowWidthSizeClass.EXPANDED)) 416.dp else 316.dp
val WindowSizeClass.horizontalPartitionDefaultSpacerSize: Dp get() = 12.dp
@@ -27,13 +26,6 @@ fun WindowWidthSizeClass.isAtLeast(other: WindowWidthSizeClass): Boolean {
return hashCode() >= other.hashCode()
}
/**
* Global check for large screen support, can be inlined after production release.
*/
fun isLargeScreenSupportEnabled(): Boolean {
return RemoteConfig.largeScreenUi
}
@OptIn(ExperimentalWindowCoreApi::class)
fun Resources.getWindowSizeClass(): WindowSizeClass {
return WindowSizeClass.compute(displayMetrics.widthPixels / displayMetrics.density, displayMetrics.heightPixels / displayMetrics.density)