Update verify identity button title. (#3466)

This commit is contained in:
Doug
2024-10-30 16:36:51 +00:00
committed by GitHub
parent 368226fd57
commit 6f158264fa
18 changed files with 29 additions and 34 deletions
@@ -234,6 +234,7 @@
"common_verification_failed" = "Verification failed";
"common_verified" = "Verified";
"common_verify_device" = "Verify device";
"common_verify_identity" = "Verify identity";
"common_video" = "Video";
"common_voice_message" = "Voice message";
"common_waiting" = "Waiting…";
+2
View File
@@ -526,6 +526,8 @@ internal enum L10n {
internal static var commonVerified: String { return L10n.tr("Localizable", "common_verified") }
/// Verify device
internal static var commonVerifyDevice: String { return L10n.tr("Localizable", "common_verify_device") }
/// Verify identity
internal static var commonVerifyIdentity: String { return L10n.tr("Localizable", "common_verify_identity") }
/// Video
internal static var commonVideo: String { return L10n.tr("Localizable", "common_video") }
/// Voice message
@@ -30,10 +30,6 @@ struct RoomMemberDetailsScreenViewState: BindableState {
var showVerificationSection: Bool {
isVerified == false && !isOwnMemberDetails
}
var verifyButtonTitle: String {
L10n.screenRoomMemberDetailsVerifyButtonTitle(memberDetails?.name ?? "")
}
}
struct RoomMemberDetailsScreenViewStateBindings {
@@ -86,7 +86,7 @@ struct RoomMemberDetailsScreen: View {
var verificationSection: some View {
if context.viewState.showVerificationSection {
Section {
ListRow(label: .default(title: context.viewState.verifyButtonTitle,
ListRow(label: .default(title: L10n.commonVerifyIdentity,
description: L10n.screenRoomMemberDetailsVerifyButtonSubtitle,
icon: \.lock),
kind: .button { })
@@ -32,10 +32,6 @@ struct UserProfileScreenViewState: BindableState {
var showVerificationSection: Bool {
isVerified == false && !isOwnUser
}
var verifyButtonTitle: String {
L10n.screenRoomMemberDetailsVerifyButtonTitle(userProfile?.displayName ?? "")
}
}
struct UserProfileScreenViewStateBindings {
@@ -83,7 +83,7 @@ struct UserProfileScreen: View {
var verificationSection: some View {
if context.viewState.showVerificationSection {
Section {
ListRow(label: .default(title: context.viewState.verifyButtonTitle,
ListRow(label: .default(title: L10n.commonVerifyIdentity,
description: L10n.screenRoomMemberDetailsVerifyButtonSubtitle,
icon: \.lock),
kind: .button { })