|
@@ -1009,11 +1009,14 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
|
let text = Utils.previewMessageText(chat: data)
|
|
|
let idMe = UserDefaults.standard.string(forKey: "me") as String?
|
|
|
if let attributeText = text as? NSMutableAttributedString {
|
|
|
+ let stringMessage = NSMutableAttributedString(string: "")
|
|
|
if data.fpin == idMe {
|
|
|
if data.lock == "1" {
|
|
|
- messageView.attributedText = ("🚫 _"+"You were deleted this message".localized()+"_").richText()
|
|
|
+ if data.messageScope == "4" {
|
|
|
+ stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12)]))
|
|
|
+ }
|
|
|
+ stringMessage.append(("🚫 _"+"You were deleted this message".localized()+"_").richText())
|
|
|
} else {
|
|
|
- let stringMessage = NSMutableAttributedString(string: "")
|
|
|
let imageStatus = NSTextAttachment()
|
|
|
let status = getRealStatus(messageId: data.messageId)
|
|
|
if (status == "1" || status == "2" ) {
|
|
@@ -1025,20 +1028,26 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
|
} else {
|
|
|
imageStatus.image = UIImage(named: "double-checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.systemBlue)
|
|
|
}
|
|
|
- imageStatus.bounds = CGRect(x: 0, y: 0, width: 15, height: 15)
|
|
|
+ imageStatus.bounds = CGRect(x: 0, y: -2, width: 15, height: 15)
|
|
|
let imageStatusString = NSAttributedString(attachment: imageStatus)
|
|
|
stringMessage.append(imageStatusString)
|
|
|
stringMessage.append(NSAttributedString(string: " "))
|
|
|
+ if data.messageScope == "4" {
|
|
|
+ stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12)]))
|
|
|
+ }
|
|
|
stringMessage.append(attributeText)
|
|
|
- messageView.attributedText = stringMessage
|
|
|
}
|
|
|
} else {
|
|
|
+ if data.messageScope == "4" {
|
|
|
+ stringMessage.append(NSAttributedString(string: User.getData(pin: data.fpin)!.firstName + ": ", attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12)]))
|
|
|
+ }
|
|
|
if data.lock == "1" {
|
|
|
- messageView.attributedText = ("🚫 _"+"This message was deleted".localized()+"_").richText()
|
|
|
+ stringMessage.append(("🚫 _"+"This message was deleted".localized()+"_").richText())
|
|
|
} else {
|
|
|
- messageView.attributedText = attributeText
|
|
|
+ stringMessage.append(attributeText)
|
|
|
}
|
|
|
}
|
|
|
+ messageView.attributedText = stringMessage
|
|
|
}
|
|
|
messageView.numberOfLines = 2
|
|
|
|