change(invites) : fix compilation after last changes
This commit is contained in:
@@ -121,9 +121,8 @@ class AcceptDeclineInvitePresenter @Inject constructor(
|
||||
client.getPendingRoom(inviteData.roomId)?.use {
|
||||
it.leave().getOrThrow()
|
||||
}
|
||||
val senderId = inviteData.senderId
|
||||
if (blockUser && senderId != null) {
|
||||
client.ignoreUser(senderId).getOrThrow()
|
||||
if (blockUser) {
|
||||
client.ignoreUser(inviteData.senderId).getOrThrow()
|
||||
}
|
||||
notificationCleaner.clearMembershipNotificationForRoom(client.sessionId, inviteData.roomId)
|
||||
inviteData.roomId
|
||||
|
||||
@@ -167,9 +167,9 @@ class JoinRoomPresenterTest {
|
||||
|
||||
awaitItem().also { state ->
|
||||
state.eventSink(JoinRoomEvents.AcceptInvite)
|
||||
state.eventSink(JoinRoomEvents.DeclineInvite)
|
||||
state.eventSink(JoinRoomEvents.DeclineInvite(false))
|
||||
|
||||
val inviteData = state.contentState.toInviteData()!!
|
||||
val inviteData = state.contentState.toInviteData()
|
||||
|
||||
assert(eventSinkRecorder)
|
||||
.isCalledExactly(2)
|
||||
|
||||
@@ -139,7 +139,7 @@ class JoinRoomViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `clicking on Accept invitation IsInvited room emits the expected Event`() {
|
||||
fun `clicking on Accept when JoinAuthorisationStatus is IsInvited emits the expected Event`() {
|
||||
val eventsRecorder = EventsRecorder<JoinRoomEvents>()
|
||||
rule.setJoinRoomView(
|
||||
aJoinRoomState(
|
||||
@@ -152,7 +152,7 @@ class JoinRoomViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `clicking on Decline invitation on IsInvited room emits the expected Event`() {
|
||||
fun `clicking on Decline when JoinAuthorisationStatus is IsInvited emits the expected Event`() {
|
||||
val eventsRecorder = EventsRecorder<JoinRoomEvents>()
|
||||
rule.setJoinRoomView(
|
||||
aJoinRoomState(
|
||||
@@ -161,7 +161,20 @@ class JoinRoomViewTest {
|
||||
),
|
||||
)
|
||||
rule.clickOn(CommonStrings.action_decline)
|
||||
eventsRecorder.assertSingle(JoinRoomEvents.DeclineInvite)
|
||||
eventsRecorder.assertSingle(JoinRoomEvents.DeclineInvite(false))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `clicking on Decline and block when JoinAuthorisationStatus is IsInvited emits the expected Event`() {
|
||||
val eventsRecorder = EventsRecorder<JoinRoomEvents>()
|
||||
rule.setJoinRoomView(
|
||||
aJoinRoomState(
|
||||
contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(null)),
|
||||
eventSink = eventsRecorder,
|
||||
),
|
||||
)
|
||||
rule.clickOn(R.string.screen_join_room_decline_and_block_button_title)
|
||||
eventsRecorder.assertSingle(JoinRoomEvents.DeclineInvite(true))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user