Move app icon composables outside of mutable Fragment class.
This way, the composables do not receive an implicit mutable parameter, which allows the compiler to mark them as skippable.
This commit is contained in:
parent
d7c06fff50
commit
131f9c4bc9
1 changed files with 226 additions and 228 deletions
|
@ -87,6 +87,15 @@ class AppIconSelectionFragment : ComposeFragment() {
|
|||
findNavController().safeNavigate(R.id.action_appIconSelectionFragment_to_appIconTutorialFragment)
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TAG = Log.tag(AppIconSelectionFragment::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
private const val LEARN_MORE_TAG = "learn_more"
|
||||
private const val URL_TAG = "URL"
|
||||
private const val COLUMN_COUNT = 4
|
||||
|
||||
/**
|
||||
* Screen allowing the user to view all the possible icon and select a new one to use.
|
||||
*/
|
||||
|
@ -227,7 +236,7 @@ class AppIconSelectionFragment : ComposeFragment() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Composable rendering the multiple layers of an adaptive icon onto one flattened rasterized Canvas.
|
||||
* Composable rendering the icon and optionally a border, to indicate selection.
|
||||
*/
|
||||
@Composable
|
||||
fun AppIcon(preset: AppIconPreset, isSelected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||
|
@ -283,9 +292,7 @@ class AppIconSelectionFragment : ComposeFragment() {
|
|||
}
|
||||
ClickableText(
|
||||
text = annotatedText,
|
||||
onClick = { _ ->
|
||||
onClick()
|
||||
},
|
||||
onClick = { onClick() },
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = modifier
|
||||
)
|
||||
|
@ -310,12 +317,3 @@ class AppIconSelectionFragment : ComposeFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TAG = Log.tag(AppIconSelectionFragment::class.java)
|
||||
|
||||
private const val LEARN_MORE_TAG = "learn_more"
|
||||
private const val URL_TAG = "URL"
|
||||
private const val COLUMN_COUNT = 4
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue