|
@@ -190,6 +190,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
textFieldSend.layer.borderWidth = 1.0
|
|
textFieldSend.layer.borderWidth = 1.0
|
|
textFieldSend.text = "Send message".localized()
|
|
textFieldSend.text = "Send message".localized()
|
|
textFieldSend.textColor = UIColor.lightGray
|
|
textFieldSend.textColor = UIColor.lightGray
|
|
|
|
+ textFieldSend.tintColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
textFieldSend.textContainerInset = UIEdgeInsets(top: 12, left: 20, bottom: 11, right: 40)
|
|
textFieldSend.textContainerInset = UIEdgeInsets(top: 12, left: 20, bottom: 11, right: 40)
|
|
textFieldSend.layer.borderColor = UIColor.lightGray.withAlphaComponent(0.5).cgColor
|
|
textFieldSend.layer.borderColor = UIColor.lightGray.withAlphaComponent(0.5).cgColor
|
|
textFieldSend.font = UIFont.systemFont(ofSize: 12)
|
|
textFieldSend.font = UIFont.systemFont(ofSize: 12)
|
|
@@ -617,7 +618,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
labelChatbot.centerYAnchor.constraint(equalTo: containerChatbot.centerYAnchor),
|
|
labelChatbot.centerYAnchor.constraint(equalTo: containerChatbot.centerYAnchor),
|
|
labelChatbot.centerXAnchor.constraint(equalTo: containerChatbot.centerXAnchor),
|
|
labelChatbot.centerXAnchor.constraint(equalTo: containerChatbot.centerXAnchor),
|
|
])
|
|
])
|
|
- labelChatbot.textColor = .black
|
|
|
|
|
|
+ labelChatbot.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelChatbot.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelChatbot.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelChatbot.text = "Interactive chatbot. Coming soon".localized()
|
|
labelChatbot.text = "Interactive chatbot. Coming soon".localized()
|
|
}
|
|
}
|
|
@@ -752,7 +753,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
searchBar.searchTextField.textColor = .mainColor
|
|
searchBar.searchTextField.textColor = .mainColor
|
|
searchBar.showsCancelButton = false
|
|
searchBar.showsCancelButton = false
|
|
searchBar.setMagnifyingGlassColorTo(color: .white)
|
|
searchBar.setMagnifyingGlassColorTo(color: .white)
|
|
- searchBar.updateHeight(height: 32, radius: 20)
|
|
|
|
|
|
+ searchBar.updateHeight(height: 36, radius: 18)
|
|
navigationItem.titleView = searchBar
|
|
navigationItem.titleView = searchBar
|
|
self.definesPresentationContext = true
|
|
self.definesPresentationContext = true
|
|
}
|
|
}
|
|
@@ -1584,7 +1585,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
labelDisable.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelDisable.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelDisable.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
labelDisable.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
])
|
|
])
|
|
- labelDisable.textColor = .black
|
|
|
|
|
|
+ labelDisable.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelDisable.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelDisable.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelDisable.text = "Call center session is over".localized()
|
|
labelDisable.text = "Call center session is over".localized()
|
|
}
|
|
}
|
|
@@ -1748,7 +1749,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
labelUnfriend.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelUnfriend.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelUnfriend.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
labelUnfriend.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
])
|
|
])
|
|
- labelUnfriend.textColor = .black
|
|
|
|
|
|
+ labelUnfriend.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelUnfriend.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelUnfriend.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelUnfriend.text = "You have unfriended this user".localized()
|
|
labelUnfriend.text = "You have unfriended this user".localized()
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
|
|
@@ -1801,7 +1802,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
labelBlocked.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelBlocked.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
|
|
labelBlocked.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
labelBlocked.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
|
|
])
|
|
])
|
|
- labelBlocked.textColor = .black
|
|
|
|
|
|
+ labelBlocked.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelBlocked.font = UIFont.systemFont(ofSize: 12).bold
|
|
labelBlocked.font = UIFont.systemFont(ofSize: 12).bold
|
|
if blocked == "1" {
|
|
if blocked == "1" {
|
|
labelBlocked.text = "You blocked this user".localized()
|
|
labelBlocked.text = "You blocked this user".localized()
|
|
@@ -3297,7 +3298,7 @@ extension EditorPersonal: UITextViewDelegate {
|
|
titlePreview.trailingAnchor.constraint(equalTo: self.containerLink.trailingAnchor, constant: -80.0).isActive = true
|
|
titlePreview.trailingAnchor.constraint(equalTo: self.containerLink.trailingAnchor, constant: -80.0).isActive = true
|
|
titlePreview.text = title
|
|
titlePreview.text = title
|
|
titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
|
|
titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
|
|
- titlePreview.textColor = .black
|
|
|
|
|
|
+ titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
|
|
|
|
let descPreview = UILabel()
|
|
let descPreview = UILabel()
|
|
self.containerLink.addSubview(descPreview)
|
|
self.containerLink.addSubview(descPreview)
|
|
@@ -4385,7 +4386,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
messageText.text = "Sorry, currently all our representatives are busy helping other customers. Do you want us to get back to you as soon as one of them is available?".localized()
|
|
messageText.text = "Sorry, currently all our representatives are busy helping other customers. Do you want us to get back to you as soon as one of them is available?".localized()
|
|
}
|
|
}
|
|
messageText.font = UIFont.systemFont(ofSize: 14, weight: .medium)
|
|
messageText.font = UIFont.systemFont(ofSize: 14, weight: .medium)
|
|
- messageText.textColor = .black
|
|
|
|
|
|
+ messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
|
|
|
|
// let date = Date()
|
|
// let date = Date()
|
|
// let formatter = DateFormatter()
|
|
// let formatter = DateFormatter()
|
|
@@ -4732,7 +4733,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
if dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "" && (dataMessages[indexPath.row]["lock"] == nil || dataMessages[indexPath.row]["lock"] as! String != "1") {
|
|
if dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "" && (dataMessages[indexPath.row]["lock"] == nil || dataMessages[indexPath.row]["lock"] as! String != "1") {
|
|
containerMessage.backgroundColor = .clear
|
|
containerMessage.backgroundColor = .clear
|
|
} else {
|
|
} else {
|
|
- containerMessage.backgroundColor = .grayColor
|
|
|
|
|
|
+ containerMessage.backgroundColor = .whiteBubbleColor
|
|
}
|
|
}
|
|
containerMessage.layer.cornerRadius = 10.0
|
|
containerMessage.layer.cornerRadius = 10.0
|
|
containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
|
|
containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
|
|
@@ -4807,7 +4808,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
messageText.translatesAutoresizingMaskIntoConstraints = false
|
|
messageText.translatesAutoresizingMaskIntoConstraints = false
|
|
let topMarginText = messageText.topAnchor.constraint(equalTo: containerMessage.topAnchor, constant: 15)
|
|
let topMarginText = messageText.topAnchor.constraint(equalTo: containerMessage.topAnchor, constant: 15)
|
|
topMarginText.isActive = true
|
|
topMarginText.isActive = true
|
|
- messageText.textColor = .black
|
|
|
|
|
|
+ messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
messageText.font = .systemFont(ofSize: 12)
|
|
messageText.font = .systemFont(ofSize: 12)
|
|
if dataMessages[indexPath.row]["attachment_flag"] as? String == "27" || dataMessages[indexPath.row]["attachment_flag"] as? String == "26" || dataMessages[indexPath.row]["message_scope_id"] as? String == "18" {
|
|
if dataMessages[indexPath.row]["attachment_flag"] as? String == "27" || dataMessages[indexPath.row]["attachment_flag"] as? String == "26" || dataMessages[indexPath.row]["message_scope_id"] as? String == "18" {
|
|
messageText.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 85).isActive = true
|
|
messageText.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 85).isActive = true
|
|
@@ -5391,7 +5392,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
titlePreview.trailingAnchor.constraint(equalTo: containerLinkMessage.trailingAnchor, constant: -5.0).isActive = true
|
|
titlePreview.trailingAnchor.constraint(equalTo: containerLinkMessage.trailingAnchor, constant: -5.0).isActive = true
|
|
titlePreview.text = title
|
|
titlePreview.text = title
|
|
titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
|
|
titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
|
|
- titlePreview.textColor = .black
|
|
|
|
|
|
+ titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
|
|
|
|
let descPreview = UILabel()
|
|
let descPreview = UILabel()
|
|
containerLinkMessage.addSubview(descPreview)
|
|
containerLinkMessage.addSubview(descPreview)
|
|
@@ -6059,12 +6060,12 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
|
|
|
|
|
|
+ containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
|
|
if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
|
|
containerMessage.backgroundColor = .clear
|
|
containerMessage.backgroundColor = .clear
|
|
} else {
|
|
} else {
|
|
- containerMessage.backgroundColor = .grayColor
|
|
|
|
|
|
+ containerMessage.backgroundColor = .whiteBubbleColor
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -6259,7 +6260,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
}
|
|
}
|
|
self.bottomAnchorPreviewReply.isActive = true
|
|
self.bottomAnchorPreviewReply.isActive = true
|
|
self.containerPreviewReply.trailingAnchor.constraint(equalTo: self.viewTextfield.trailingAnchor).isActive = true
|
|
self.containerPreviewReply.trailingAnchor.constraint(equalTo: self.viewTextfield.trailingAnchor).isActive = true
|
|
- self.containerPreviewReply.backgroundColor = .secondaryColor
|
|
|
|
|
|
+ self.containerPreviewReply.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .secondaryColor
|
|
|
|
|
|
let leftReply = UIView()
|
|
let leftReply = UIView()
|
|
self.containerPreviewReply.addSubview(leftReply)
|
|
self.containerPreviewReply.addSubview(leftReply)
|
|
@@ -6320,7 +6321,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
} else if (attachment_flag == "11") {
|
|
} else if (attachment_flag == "11") {
|
|
contentReply.text = "❤️ Sticker"
|
|
contentReply.text = "❤️ Sticker"
|
|
}
|
|
}
|
|
- contentReply.textColor = .gray
|
|
|
|
|
|
+ contentReply.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .gray
|
|
|
|
|
|
let buttonCancelReply = UIButton(type: .custom)
|
|
let buttonCancelReply = UIButton(type: .custom)
|
|
self.containerPreviewReply.addSubview(buttonCancelReply)
|
|
self.containerPreviewReply.addSubview(buttonCancelReply)
|
|
@@ -6422,12 +6423,12 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
|
|
|
|
|
|
+ containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
if (messageTextForSearch[idx]["attachment_flag"] as? String == "11") {
|
|
if (messageTextForSearch[idx]["attachment_flag"] as? String == "11") {
|
|
containerMessage.backgroundColor = .clear
|
|
containerMessage.backgroundColor = .clear
|
|
} else {
|
|
} else {
|
|
- containerMessage.backgroundColor = .grayColor
|
|
|
|
|
|
+ containerMessage.backgroundColor = .whiteBubbleColor
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|