mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
all: refactor Modifier ordering
Drawns on the suggestions outlined in https://chris.banes.dev/always-provide-a-modifier/
This commit is contained in:
parent
2606f2e79b
commit
cfd0725605
7 changed files with 15 additions and 14 deletions
|
@ -41,7 +41,7 @@ fun ClawFab(
|
|||
targetOffsetY = { fullHeight -> fullHeight },
|
||||
animationSpec = tween(durationMillis = AnimationDuration, easing = FastOutLinearInEasing),
|
||||
),
|
||||
modifier = Modifier.then(modifier),
|
||||
modifier = modifier,
|
||||
) {
|
||||
FloatingActionButton(onClick = { coroutineScope.launch { listState.animateScrollToItem(0) } }) {
|
||||
Icon(
|
||||
|
|
|
@ -37,7 +37,7 @@ fun HottestPosts(
|
|||
listState = listState,
|
||||
isSaved = isPostSaved,
|
||||
postActions = postActions,
|
||||
modifier = Modifier.padding(top = 16.dp).then(modifier),
|
||||
modifier = modifier.padding(top = 16.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ fun NetworkPosts(
|
|||
val coroutineScope = rememberCoroutineScope()
|
||||
LazyColumn(
|
||||
state = listState,
|
||||
modifier = Modifier.then(modifier),
|
||||
modifier = modifier,
|
||||
) {
|
||||
items(items) { item ->
|
||||
if (item != null) {
|
||||
|
|
|
@ -22,6 +22,6 @@ fun ClawAppBar(
|
|||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
)
|
||||
},
|
||||
modifier = Modifier.then(modifier),
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue