mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Remove NodeBuilder to ensure that Params and Callback are always provided.
This commit is contained in:
committed by
Benoit Marty
parent
be03c50aaf
commit
02dc71c4c3
+1
-6
@@ -14,12 +14,7 @@ import io.element.android.libraries.architecture.FeatureEntryPoint
|
||||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
|
||||
interface MediaGalleryEntryPoint : FeatureEntryPoint {
|
||||
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder
|
||||
|
||||
interface NodeBuilder {
|
||||
fun callback(callback: Callback): NodeBuilder
|
||||
fun build(): Node
|
||||
}
|
||||
fun createNode(parentNode: Node, buildContext: BuildContext, callback: Callback): Node
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onBackClick()
|
||||
|
||||
+2
-7
@@ -19,14 +19,9 @@ import io.element.android.libraries.matrix.api.timeline.Timeline
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
interface MediaViewerEntryPoint : FeatureEntryPoint {
|
||||
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder
|
||||
fun createNode(parentNode: Node, buildContext: BuildContext, params: Params, callback: Callback): Node
|
||||
|
||||
interface NodeBuilder {
|
||||
fun callback(callback: Callback): NodeBuilder
|
||||
fun params(params: Params): NodeBuilder
|
||||
fun avatar(filename: String, avatarUrl: String): NodeBuilder
|
||||
fun build(): Node
|
||||
}
|
||||
fun createParamsForAvatar(filename: String, avatarUrl: String): Params
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onDone()
|
||||
|
||||
Reference in New Issue
Block a user