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