-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#541] Integrate the Twitter Jetpack Compose Rules Detekt plugin #556
base: develop
Are you sure you want to change the base?
Changes from all commits
be92fe1
391946a
815f42a
bfda1aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,9 +22,9 @@ import co.nimblehq.sample.compose.ui.theme.ComposeTheme | |||||||||
|
||||||||||
@Composable | ||||||||||
fun SecondScreen( | ||||||||||
id: String, | ||||||||||
viewModel: SecondViewModel = hiltViewModel(), | ||||||||||
navigator: (destination: BaseDestination) -> Unit, | ||||||||||
Comment on lines
26
to
27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the
Suggested change
|
||||||||||
id: String, | ||||||||||
) { | ||||||||||
SecondScreenContent( | ||||||||||
id = id, | ||||||||||
|
@@ -37,11 +37,15 @@ fun SecondScreen( | |||||||||
@Composable | ||||||||||
private fun SecondScreenContent( | ||||||||||
id: String, | ||||||||||
modifier: Modifier = Modifier, | ||||||||||
onUpdateClick: () -> Unit, | ||||||||||
Comment on lines
39
to
41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please cross-check with some config from https://github.com/appKODE/detekt-rules-compose, which forces us to order the |
||||||||||
) { | ||||||||||
Scaffold(topBar = { | ||||||||||
AppBar(R.string.second_title_bar) | ||||||||||
}) { paddingValues -> | ||||||||||
Scaffold( | ||||||||||
topBar = { | ||||||||||
AppBar(R.string.second_title_bar) | ||||||||||
}, | ||||||||||
modifier = modifier, | ||||||||||
) { paddingValues -> | ||||||||||
Box( | ||||||||||
modifier = Modifier | ||||||||||
.fillMaxSize() | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,19 +20,23 @@ import co.nimblehq.sample.compose.ui.theme.ComposeTheme | |
|
||
@Composable | ||
fun ThirdScreen( | ||
model: UiModel?, | ||
viewModel: ThirdViewModel = hiltViewModel(), | ||
navigator: (destination: BaseDestination) -> Unit, | ||
Comment on lines
+23
to
25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, params with default values to the bottom. |
||
model: UiModel?, | ||
) { | ||
ThirdScreenContent(data = model) | ||
} | ||
|
||
@Composable | ||
fun ThirdScreenContent(data: UiModel?) { | ||
fun ThirdScreenContent( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. must be private |
||
data: UiModel?, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Scaffold( | ||
topBar = { | ||
AppBar(title = R.string.third_title_bar) | ||
} | ||
}, | ||
modifier = modifier, | ||
) { paddingValues -> | ||
Box( | ||
modifier = Modifier | ||
|
@@ -50,7 +54,7 @@ fun ThirdScreenContent(data: UiModel?) { | |
|
||
@Preview | ||
@Composable | ||
fun ThirdScreenPreview() { | ||
private fun ThirdScreenPreview() { | ||
ComposeTheme { | ||
ThirdScreenContent(data = UiModel("1", "name1")) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same