all: refactor Modifier ordering

Drawns on the suggestions outlined in https://chris.banes.dev/always-provide-a-modifier/
This commit is contained in:
Harsh Shandilya 2021-10-25 00:47:52 +05:30
parent 2606f2e79b
commit cfd0725605
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
7 changed files with 15 additions and 14 deletions

View file

@ -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(

View file

@ -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),
)
}
}

View file

@ -31,7 +31,7 @@ fun NetworkPosts(
val coroutineScope = rememberCoroutineScope()
LazyColumn(
state = listState,
modifier = Modifier.then(modifier),
modifier = modifier,
) {
items(items) { item ->
if (item != null) {

View file

@ -22,6 +22,6 @@ fun ClawAppBar(
modifier = Modifier.padding(horizontal = 16.dp),
)
},
modifier = Modifier.then(modifier),
modifier = modifier,
)
}