chore: use i18n words for follow request action

This commit is contained in:
CMK 2022-06-30 15:58:09 +08:00
parent dd87330a0f
commit 26a44b93f2
2 changed files with 4 additions and 4 deletions

View File

@ -164,12 +164,12 @@ extension NotificationView.ViewModel {
notificationView.rejectFollowRequestButtonShadowBackgroundContainer.isHidden = true
notificationView.acceptFollowRequestButton.isUserInteractionEnabled = false
notificationView.acceptFollowRequestButton.setImage(nil, for: .normal)
notificationView.acceptFollowRequestButton.setTitle("Accepted", for: .normal)
notificationView.acceptFollowRequestButton.setTitle(L10n.Scene.Notification.FollowRequest.accepted, for: .normal)
case .isReject:
notificationView.acceptFollowRequestButtonShadowBackgroundContainer.isHidden = true
notificationView.rejectFollowRequestButton.isUserInteractionEnabled = false
notificationView.rejectFollowRequestButton.setImage(nil, for: .normal)
notificationView.rejectFollowRequestButton.setTitle("Rejected", for: .normal)
notificationView.rejectFollowRequestButton.setTitle(L10n.Scene.Notification.FollowRequest.rejected, for: .normal)
default:
break
}

View File

@ -119,7 +119,7 @@ public final class NotificationView: UIView {
button.layer.masksToBounds = true
button.layer.cornerCurve = .continuous
button.layer.cornerRadius = 4
button.accessibilityLabel = "Accept"
button.accessibilityLabel = L10n.Scene.Notification.FollowRequest.accept
acceptFollowRequestButtonShadowBackgroundContainer.cornerRadius = 4
acceptFollowRequestButtonShadowBackgroundContainer.shadowAlpha = 0.1
button.addTarget(self, action: #selector(NotificationView.acceptFollowRequestButtonDidPressed(_:)), for: .touchUpInside)
@ -139,7 +139,7 @@ public final class NotificationView: UIView {
button.layer.masksToBounds = true
button.layer.cornerCurve = .continuous
button.layer.cornerRadius = 4
button.accessibilityLabel = "Reject"
button.accessibilityLabel = L10n.Scene.Notification.FollowRequest.reject
rejectFollowRequestButtonShadowBackgroundContainer.cornerRadius = 4
rejectFollowRequestButtonShadowBackgroundContainer.shadowAlpha = 0.1
button.addTarget(self, action: #selector(NotificationView.rejectFollowRequestButtonDidPressed(_:)), for: .touchUpInside)