Rename fun in Callback for clarity.
This commit is contained in:
committed by
Benoit Marty
parent
45b5783b23
commit
09a18ad7ca
@@ -64,7 +64,7 @@ class PollHistoryFlowNode(
|
||||
}
|
||||
NavTarget.Root -> {
|
||||
val callback = object : PollHistoryNode.Callback {
|
||||
override fun onEditPoll(pollStartEventId: EventId) {
|
||||
override fun navigateToEditPoll(pollStartEventId: EventId) {
|
||||
backstack.push(NavTarget.EditPoll(pollStartEventId))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ class PollHistoryNode(
|
||||
plugins = plugins,
|
||||
) {
|
||||
interface Callback : Plugin {
|
||||
fun onEditPoll(pollStartEventId: EventId)
|
||||
fun navigateToEditPoll(pollStartEventId: EventId)
|
||||
}
|
||||
|
||||
private fun onEditPoll(pollStartEventId: EventId) {
|
||||
plugins<Callback>().forEach { it.onEditPoll(pollStartEventId) }
|
||||
plugins<Callback>().forEach { it.navigateToEditPoll(pollStartEventId) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
Reference in New Issue
Block a user