Remove context(parentNode: Node) and provide the parent Node as a parameter.
This commit is contained in:
parent
45400d70d2
commit
e70d767183
161 changed files with 668 additions and 436 deletions
|
|
@ -18,8 +18,8 @@ import io.element.android.libraries.matrix.api.room.JoinedRoom
|
|||
|
||||
@ContributesBinding(SessionScope::class)
|
||||
class DefaultChangeRoomMemberRolesEntyPoint : ChangeRoomMemberRolesEntryPoint {
|
||||
context(parentNode: Node)
|
||||
override fun createNode(
|
||||
parentNode: Node,
|
||||
buildContext: BuildContext,
|
||||
room: JoinedRoom,
|
||||
listType: ChangeRoomMemberRolesListType,
|
||||
|
|
|
|||
|
|
@ -31,13 +31,12 @@ class DefaultChangeRoomMemberRolesEntyPointTest {
|
|||
}
|
||||
val room = FakeJoinedRoom()
|
||||
val listType = ChangeRoomMemberRolesListType.Admins
|
||||
val result = with(parentNode) {
|
||||
entryPoint.createNode(
|
||||
buildContext = BuildContext.root(null),
|
||||
room = FakeJoinedRoom(),
|
||||
listType = listType,
|
||||
)
|
||||
}
|
||||
val result = entryPoint.createNode(
|
||||
parentNode = parentNode,
|
||||
buildContext = BuildContext.root(null),
|
||||
room = FakeJoinedRoom(),
|
||||
listType = listType,
|
||||
)
|
||||
assertThat(result).isInstanceOf(ChangeRoomMemberRolesRootNode::class.java)
|
||||
// Search for the Inputs plugin
|
||||
val input = result.plugins.filterIsInstance<ChangeRoomMemberRolesRootNode.Inputs>().single()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue