avoiding recalculating static toolbar height
This commit is contained in:
parent
eb497be421
commit
19724ea5b3
|
@ -60,7 +60,8 @@ fun DirectoryScreen(directoryViewModel: DirectoryViewModel) {
|
||||||
)
|
)
|
||||||
|
|
||||||
val toolbarHeight = 72.dp
|
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) }
|
val toolbarOffsetHeightPx = remember { mutableStateOf(0f) }
|
||||||
|
|
||||||
directoryViewModel.ObserveEvents(listState, toolbarOffsetHeightPx)
|
directoryViewModel.ObserveEvents(listState, toolbarOffsetHeightPx)
|
||||||
|
|
Loading…
Reference in New Issue