mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-03-11 01:20:15 +01:00
avoiding recalculating static toolbar height
This commit is contained in:
parent
47be48579d
commit
a1460b307d
@ -60,7 +60,8 @@ fun DirectoryScreen(directoryViewModel: DirectoryViewModel) {
|
||||
)
|
||||
|
||||
val toolbarHeight = 72.dp
|
||||
val toolbarHeightPx = with(LocalDensity.current) { toolbarHeight.roundToPx().toFloat() }
|
||||
val density = LocalDensity.current
|
||||
val toolbarHeightPx = remember { with(density) { toolbarHeight.roundToPx().toFloat() } }
|
||||
val toolbarOffsetHeightPx = remember { mutableStateOf(0f) }
|
||||
|
||||
directoryViewModel.ObserveEvents(listState, toolbarOffsetHeightPx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user