mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-16 12:10:45 +01:00
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 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