Skip to content

Commit cf37677

Browse files
committed
Replaced deprecated WindowHeightSizeClass with isHeightAtLeastBreakpoint.
1 parent 41b6a64 commit cf37677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ fun MyApp(
5252
windowSizeClass: WindowSizeClass = currentWindowAdaptiveInfo().windowSizeClass
5353
) {
5454
// Perform logic on the size class to decide whether to show the top app bar.
55-
val showTopAppBar = windowSizeClass.windowHeightSizeClass != WindowHeightSizeClass.COMPACT
55+
val showTopAppBar = windowSizeClass.isHeightAtLeastBreakpoint(480)
5656

57-
// MyScreen knows nothing about window sizes, and performs logic based on a Boolean flag.
57+
// MyScreen knows nothing about window sizes, and performs logic based on a boolean flag.
5858
MyScreen(
5959
showTopAppBar = showTopAppBar,
6060
/* ... */

0 commit comments

Comments
 (0)