mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Rename onDone to onBackClick.
This commit is contained in:
+1
-1
@@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
+4
-4
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user