Rename onDone to onBackClick.
This commit is contained in:
parent
220704077c
commit
197fda5d0e
4 changed files with 10 additions and 10 deletions
|
|
@ -243,7 +243,7 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
|||
}
|
||||
is NavTarget.MediaGallery -> {
|
||||
val callback = object : MediaGalleryEntryPoint.Callback {
|
||||
override fun onDone() {
|
||||
override fun onBackClick() {
|
||||
backstack.pop()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ interface MediaGalleryEntryPoint : FeatureEntryPoint {
|
|||
}
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onDone()
|
||||
fun onBackClick()
|
||||
fun onViewInTimeline(eventId: EventId)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ class MediaGalleryNode @AssistedInject constructor(
|
|||
)
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onDone()
|
||||
fun onBackClick()
|
||||
fun onItemClick(item: MediaItem.Event)
|
||||
fun onViewInTimeline(eventId: EventId)
|
||||
}
|
||||
|
||||
private fun onDone() {
|
||||
private fun onBackClick() {
|
||||
plugins<Callback>().forEach {
|
||||
it.onDone()
|
||||
it.onBackClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ class MediaGalleryNode @AssistedInject constructor(
|
|||
val state = presenter.present()
|
||||
MediaGalleryView(
|
||||
state = state,
|
||||
onBackClick = ::onDone,
|
||||
onBackClick = ::onBackClick,
|
||||
onItemClick = ::onItemClick,
|
||||
modifier = modifier,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ class MediaGalleryRootNode @AssistedInject constructor(
|
|||
) : NavTarget
|
||||
}
|
||||
|
||||
private fun onDone() {
|
||||
private fun onBackClick() {
|
||||
plugins<MediaGalleryEntryPoint.Callback>().forEach {
|
||||
it.onDone()
|
||||
it.onBackClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ class MediaGalleryRootNode @AssistedInject constructor(
|
|||
return when (navTarget) {
|
||||
NavTarget.Root -> {
|
||||
val callback = object : MediaGalleryNode.Callback {
|
||||
override fun onDone() {
|
||||
this@MediaGalleryRootNode.onDone()
|
||||
override fun onBackClick() {
|
||||
this@MediaGalleryRootNode.onBackClick()
|
||||
}
|
||||
|
||||
override fun onViewInTimeline(eventId: EventId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue