mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
UserProfileEvents -> UserProfileEvent
This commit is contained in:
+4
-4
@@ -17,7 +17,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import dev.zacsweers.metro.Assisted
|
||||
import dev.zacsweers.metro.AssistedInject
|
||||
import io.element.android.features.userprofile.api.UserProfileEvents
|
||||
import io.element.android.features.userprofile.api.UserProfileEvent
|
||||
import io.element.android.features.userprofile.api.UserProfilePresenterFactory
|
||||
import io.element.android.features.userprofile.api.UserProfileState
|
||||
import io.element.android.features.userprofile.api.UserProfileVerificationState
|
||||
@@ -112,12 +112,12 @@ class RoomMemberDetailsPresenter(
|
||||
}
|
||||
}
|
||||
|
||||
fun handleEvent(event: UserProfileEvents) {
|
||||
fun handleEvent(event: UserProfileEvent) {
|
||||
when (event) {
|
||||
UserProfileEvents.WithdrawVerification -> coroutineScope.launch {
|
||||
UserProfileEvent.WithdrawVerification -> coroutineScope.launch {
|
||||
encryptionService.withdrawVerification(roomMemberId)
|
||||
}
|
||||
is UserProfileEvents.CopyToClipboard -> {
|
||||
is UserProfileEvent.CopyToClipboard -> {
|
||||
clipboardHelper.copyPlainText(event.text)
|
||||
snackbarDispatcher.post(SnackbarMessage(CommonStrings.common_copied_to_clipboard))
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ package io.element.android.features.roomdetails.impl.members.details
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.features.roomdetails.impl.aJoinedRoom
|
||||
import io.element.android.features.roomdetails.impl.members.aRoomMember
|
||||
import io.element.android.features.userprofile.api.UserProfileEvents
|
||||
import io.element.android.features.userprofile.api.UserProfileEvent
|
||||
import io.element.android.features.userprofile.api.UserProfilePresenterFactory
|
||||
import io.element.android.features.userprofile.api.UserProfileVerificationState
|
||||
import io.element.android.features.userprofile.shared.aUserProfileState
|
||||
@@ -348,7 +348,7 @@ class RoomMemberDetailsPresenterTest {
|
||||
|
||||
consumeItemsUntilPredicate { it.verificationState == UserProfileVerificationState.VERIFICATION_VIOLATION }
|
||||
|
||||
initialState.eventSink(UserProfileEvents.WithdrawVerification)
|
||||
initialState.eventSink(UserProfileEvent.WithdrawVerification)
|
||||
withdrawVerificationResult.assertions().isCalledOnce()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user