Rename fun in Callback for clarity.
This commit is contained in:
parent
45b5783b23
commit
09a18ad7ca
104 changed files with 658 additions and 664 deletions
|
|
@ -52,7 +52,7 @@ class DependenciesFlowNode(
|
|||
return when (navTarget) {
|
||||
is NavTarget.LicensesList -> {
|
||||
val callback = object : DependencyLicensesListNode.Callback {
|
||||
override fun onOpenLicense(license: DependencyLicenseItem) {
|
||||
override fun navigateToLicense(license: DependencyLicenseItem) {
|
||||
backstack.push(NavTarget.LicenseDetails(license))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ class DependencyLicensesListNode(
|
|||
plugins = plugins
|
||||
) {
|
||||
interface Callback : Plugin {
|
||||
fun onOpenLicense(license: DependencyLicenseItem)
|
||||
fun navigateToLicense(license: DependencyLicenseItem)
|
||||
}
|
||||
|
||||
private fun onOpenLicense(license: DependencyLicenseItem) {
|
||||
plugins<Callback>()
|
||||
.forEach { it.onOpenLicense(license) }
|
||||
.forEach { it.navigateToLicense(license) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue