Skip to content

Commit

Permalink
Replaced deprecated WindowHeightSizeClass with isHeightAtLeastBreakpo…
Browse files Browse the repository at this point in the history
…int.
  • Loading branch information
JonEckenrode committed Dec 11, 2024
1 parent 41b6a64 commit cf37677
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ fun MyApp(
windowSizeClass: WindowSizeClass = currentWindowAdaptiveInfo().windowSizeClass
) {
// Perform logic on the size class to decide whether to show the top app bar.
val showTopAppBar = windowSizeClass.windowHeightSizeClass != WindowHeightSizeClass.COMPACT
val showTopAppBar = windowSizeClass.isHeightAtLeastBreakpoint(480)

// MyScreen knows nothing about window sizes, and performs logic based on a Boolean flag.
// MyScreen knows nothing about window sizes, and performs logic based on a boolean flag.
MyScreen(
showTopAppBar = showTopAppBar,
/* ... */
Expand Down

0 comments on commit cf37677

Please sign in to comment.