Remove Modifier parameter in private function when only default value is used.

This will improve the code coverage metrics, and this also fixes a few potential bug, where the Modifier was used several times.
This commit is contained in:
Benoit Marty 2024-02-08 10:03:24 +01:00 committed by Benoit Marty
parent d06e5c23cb
commit b104dba845
59 changed files with 117 additions and 262 deletions

View file

@ -37,7 +37,6 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight
@Composable
fun ConnectivityIndicatorView(
isOnline: Boolean,
modifier: Modifier = Modifier,
) {
val isIndicatorVisible = remember { MutableTransitionState(!isOnline) }.apply { targetState = !isOnline }
val isStatusBarPaddingVisible = remember { MutableTransitionState(isOnline) }.apply { targetState = isOnline }
@ -48,7 +47,7 @@ fun ConnectivityIndicatorView(
enter = fadeIn() + expandVertically(),
exit = fadeOut() + shrinkVertically(),
) {
Indicator(modifier)
Indicator()
}
// Show missing status bar padding when the indicator is not visible
@ -57,7 +56,7 @@ fun ConnectivityIndicatorView(
enter = fadeIn() + expandVertically(),
exit = fadeOut() + shrinkVertically(),
) {
StatusBarPaddingSpacer(modifier)
StatusBarPaddingSpacer()
}
}