update leave group copy in conversation settings view

pull/799/head
ryanzhao 2 years ago
parent 6302170e4d
commit 7f24097343

@ -394,11 +394,25 @@ class ThreadSettingsViewModel: SessionTableViewModel<ThreadSettingsViewModel.Nav
accessibilityIdentifier: "Leave group", accessibilityIdentifier: "Leave group",
accessibilityLabel: "Leave group", accessibilityLabel: "Leave group",
confirmationInfo: ConfirmationModal.Info( confirmationInfo: ConfirmationModal.Info(
title: "CONFIRM_LEAVE_GROUP_TITLE".localized(), title: "leave_group_confirmation_alert_title".localized(),
explanation: (currentUserIsClosedGroupAdmin ? attributedExplanation: {
"Because you are the creator of this group it will be deleted for everyone. This cannot be undone." : if currentUserIsClosedGroupAdmin {
"CONFIRM_LEAVE_GROUP_DESCRIPTION".localized() return NSAttributedString(string: "admin_group_leave_warning".localized())
), }
let mutableAttributedString = NSMutableAttributedString(
string: String(
format: "leave_community_confirmation_alert_message".localized(),
threadViewModel.displayName
)
)
mutableAttributedString.addAttribute(
.font,
value: UIFont.boldSystemFont(ofSize: Values.smallFontSize),
range: (mutableAttributedString.string as NSString).range(of: threadViewModel.displayName)
)
return mutableAttributedString
}(),
confirmTitle: "LEAVE_BUTTON_TITLE".localized(), confirmTitle: "LEAVE_BUTTON_TITLE".localized(),
confirmStyle: .danger, confirmStyle: .danger,
cancelStyle: .alert_text cancelStyle: .alert_text

Loading…
Cancel
Save