Add user verification and verification state violation badges (#4392)
* Move `observeRoomMemberIdentityStateChange` and associated classes to `libs:matrixui` module so they can be reused * Add `EncryptionService.getUserIdentity` method to retrieve not only if the user is verified or not, but in which state they are * Fix `IdentityChangePresenter` after the previous changes * Fix `withFakeLifecycleOwner` and add `testWithLifecycleOwner` helper * Display verified badge in DM top app bar when possible * Display a verification violation warning icon next to the 'People' item in room details screen * Display either a verified badge or a verification violation warning icon next to the room members in the room member list screen * Display either a verified badge or a verification violation warning and withdraw verification button in the room member profile. Generic user profiles won't display verification state anymore since we can't easily track changes in it. * Add preview for room member details screen with verification violation identity state * Add verified and violation badge to the `Profile` list item in room details screen * Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
b0e6b50c79
commit
fd50ce4daf
75 changed files with 889 additions and 364 deletions
|
|
@ -14,4 +14,5 @@ sealed interface UserProfileEvents {
|
|||
data class UnblockUser(val needsConfirmation: Boolean = false) : UserProfileEvents
|
||||
data object ClearBlockUserError : UserProfileEvents
|
||||
data object ClearConfirmationDialog : UserProfileEvents
|
||||
data object WithdrawVerification : UserProfileEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ data class UserProfileState(
|
|||
val userId: UserId,
|
||||
val userName: String?,
|
||||
val avatarUrl: String?,
|
||||
val isVerified: AsyncData<Boolean>,
|
||||
val verificationState: UserProfileVerificationState,
|
||||
val isBlocked: AsyncData<Boolean>,
|
||||
val startDmActionState: AsyncAction<RoomId>,
|
||||
val displayConfirmationDialog: ConfirmationDialog?,
|
||||
|
|
@ -30,3 +30,10 @@ data class UserProfileState(
|
|||
Unblock
|
||||
}
|
||||
}
|
||||
|
||||
enum class UserProfileVerificationState {
|
||||
UNKNOWN,
|
||||
VERIFIED,
|
||||
UNVERIFIED,
|
||||
VERIFICATION_VIOLATION,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue