|
@@ -87,7 +87,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
|
|
segment.sizeToFit()
|
|
segment.sizeToFit()
|
|
segment.selectedSegmentIndex = 0
|
|
segment.selectedSegmentIndex = 0
|
|
segment.addTarget(self, action: #selector(segmentChanged(sender:)), for: .valueChanged)
|
|
segment.addTarget(self, action: #selector(segmentChanged(sender:)), for: .valueChanged)
|
|
- segment.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12.0)], for: .normal)
|
|
|
|
|
|
+ segment.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12.0 + String.offset() * 0.5)], for: .normal)
|
|
return segment
|
|
return segment
|
|
}()
|
|
}()
|
|
|
|
|
|
@@ -328,7 +328,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
|
|
textViewSearch.placeholder = "Search...".localized()
|
|
textViewSearch.placeholder = "Search...".localized()
|
|
textViewSearch.isUserInteractionEnabled = true
|
|
textViewSearch.isUserInteractionEnabled = true
|
|
imageViewSearch.addSubview(textViewSearch)
|
|
imageViewSearch.addSubview(textViewSearch)
|
|
- textViewSearch.font = .systemFont(ofSize: 11)
|
|
|
|
|
|
+ textViewSearch.font = .systemFont(ofSize: 11 + String.offset())
|
|
textViewSearch.anchor(top: imageViewSearch.topAnchor, bottom: imageViewSearch.bottomAnchor, right: imageViewSearch.rightAnchor, paddingTop: 5, paddingBottom: 5, paddingRight: 90)
|
|
textViewSearch.anchor(top: imageViewSearch.topAnchor, bottom: imageViewSearch.bottomAnchor, right: imageViewSearch.rightAnchor, paddingTop: 5, paddingBottom: 5, paddingRight: 90)
|
|
leftTVSearch = textViewSearch.leftAnchor.constraint(equalTo: imageViewSearch.leftAnchor, constant: 20.0)
|
|
leftTVSearch = textViewSearch.leftAnchor.constraint(equalTo: imageViewSearch.leftAnchor, constant: 20.0)
|
|
NSLayoutConstraint.activate([
|
|
NSLayoutConstraint.activate([
|
|
@@ -756,7 +756,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
|
|
viewCatInTV.addSubview(imageText)
|
|
viewCatInTV.addSubview(imageText)
|
|
imageText.textColor = .white
|
|
imageText.textColor = .white
|
|
imageText.anchor(left: imageIcon.rightAnchor, paddingLeft: 3, centerY: viewCatInTV.centerYAnchor, height: 12)
|
|
imageText.anchor(left: imageIcon.rightAnchor, paddingLeft: 3, centerY: viewCatInTV.centerYAnchor, height: 12)
|
|
- imageText.font = .systemFont(ofSize: 12)
|
|
|
|
|
|
+ imageText.font = .systemFont(ofSize: 12 + String.offset())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1405,7 +1405,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
if noData || (isFiltering && fillteredData.count == 0) {
|
|
if noData || (isFiltering && fillteredData.count == 0) {
|
|
let labelNochat = UILabel()
|
|
let labelNochat = UILabel()
|
|
labelNochat.text = isFiltering ? "No Result".localized() : loadingData ? "Loading Data...".localized() : "There are no conversations".localized()
|
|
labelNochat.text = isFiltering ? "No Result".localized() : loadingData ? "Loading Data...".localized() : "There are no conversations".localized()
|
|
- labelNochat.font = .systemFont(ofSize: 13)
|
|
|
|
|
|
+ labelNochat.font = .systemFont(ofSize: 13 + String.offset())
|
|
labelNochat.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelNochat.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
content.addSubview(labelNochat)
|
|
content.addSubview(labelNochat)
|
|
labelNochat.anchor(centerX: content.centerXAnchor, centerY: content.centerYAnchor)
|
|
labelNochat.anchor(centerX: content.centerXAnchor, centerY: content.centerYAnchor)
|
|
@@ -1420,7 +1420,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
if chats.count == 0 || (indexPath.row > (chats.count - 1)) {
|
|
if chats.count == 0 || (indexPath.row > (chats.count - 1)) {
|
|
let labelNochat = UILabel()
|
|
let labelNochat = UILabel()
|
|
labelNochat.text = loadingData ? "Loading Data...".localized() : "There are no conversations".localized()
|
|
labelNochat.text = loadingData ? "Loading Data...".localized() : "There are no conversations".localized()
|
|
- labelNochat.font = .systemFont(ofSize: 13)
|
|
|
|
|
|
+ labelNochat.font = .systemFont(ofSize: 13 + String.offset())
|
|
labelNochat.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
labelNochat.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
content.addSubview(labelNochat)
|
|
content.addSubview(labelNochat)
|
|
labelNochat.anchor(centerX: content.centerXAnchor, centerY: content.centerYAnchor)
|
|
labelNochat.anchor(centerX: content.centerXAnchor, centerY: content.centerYAnchor)
|
|
@@ -1435,8 +1435,8 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
let subtitle = UILabel()
|
|
let subtitle = UILabel()
|
|
title.textColor = .black
|
|
title.textColor = .black
|
|
subtitle.textColor = .gray
|
|
subtitle.textColor = .gray
|
|
- title.font = .systemFont(ofSize: 16, weight: .medium)
|
|
|
|
- subtitle.font = .systemFont(ofSize: 14)
|
|
|
|
|
|
+ title.font = .systemFont(ofSize: 16 + String.offset(), weight: .medium)
|
|
|
|
+ subtitle.font = .systemFont(ofSize: 14 + String.offset())
|
|
content.addSubview(title)
|
|
content.addSubview(title)
|
|
content.addSubview(subtitle)
|
|
content.addSubview(subtitle)
|
|
title.anchor(top: content.topAnchor, left: content.leftAnchor, paddingTop: 10, paddingLeft: 20)
|
|
title.anchor(top: content.topAnchor, left: content.leftAnchor, paddingTop: 10, paddingLeft: 20)
|
|
@@ -1453,7 +1453,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
content.addSubview(timeView)
|
|
content.addSubview(timeView)
|
|
timeView.anchor(top: content.topAnchor, right: imageArrowRight.leftAnchor, paddingTop: 10, paddingRight: 20)
|
|
timeView.anchor(top: content.topAnchor, right: imageArrowRight.leftAnchor, paddingTop: 10, paddingRight: 20)
|
|
timeView.textColor = .gray
|
|
timeView.textColor = .gray
|
|
- timeView.font = UIFont.systemFont(ofSize: 16)
|
|
|
|
|
|
+ timeView.font = UIFont.systemFont(ofSize: 16 + String.offset())
|
|
|
|
|
|
let date = Date(milliseconds: Int64(data.serverDate)!)
|
|
let date = Date(milliseconds: Int64(data.serverDate)!)
|
|
let calendar = Calendar.current
|
|
let calendar = Calendar.current
|
|
@@ -1509,7 +1509,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
|
|
|
|
let nameFile = UILabel()
|
|
let nameFile = UILabel()
|
|
container.addSubview(nameFile)
|
|
container.addSubview(nameFile)
|
|
- nameFile.font = .systemFont(ofSize: 12, weight: .medium)
|
|
|
|
|
|
+ nameFile.font = .systemFont(ofSize: 12 + String.offset(), weight: .medium)
|
|
nameFile.textColor = .black
|
|
nameFile.textColor = .black
|
|
nameFile.numberOfLines = 2
|
|
nameFile.numberOfLines = 2
|
|
nameFile.anchor(top: container.topAnchor, left: imageFile.rightAnchor, right: container.rightAnchor, paddingTop: 5, paddingLeft: 10, paddingRight: 5)
|
|
nameFile.anchor(top: container.topAnchor, left: imageFile.rightAnchor, right: container.rightAnchor, paddingTop: 5, paddingLeft: 10, paddingRight: 5)
|
|
@@ -1567,7 +1567,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
}
|
|
}
|
|
container.addSubview(fileSub)
|
|
container.addSubview(fileSub)
|
|
fileSub.anchor(top: nameFile.bottomAnchor, left: imageFile.rightAnchor, bottom: container.bottomAnchor, paddingLeft: 10, paddingBottom: 5)
|
|
fileSub.anchor(top: nameFile.bottomAnchor, left: imageFile.rightAnchor, bottom: container.bottomAnchor, paddingLeft: 10, paddingBottom: 5)
|
|
- fileSub.font = .systemFont(ofSize: 10)
|
|
|
|
|
|
+ fileSub.font = .systemFont(ofSize: 10 + String.offset())
|
|
fileSub.textColor = .gray
|
|
fileSub.textColor = .gray
|
|
let objectTap = ObjectGesture(target: self, action: #selector(onContSearch(_:)))
|
|
let objectTap = ObjectGesture(target: self, action: #selector(onContSearch(_:)))
|
|
objectTap.file_id = data.file
|
|
objectTap.file_id = data.file
|
|
@@ -1635,7 +1635,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
titlePreview.topAnchor.constraint(equalTo: container.topAnchor, constant: 10.0).isActive = true
|
|
titlePreview.topAnchor.constraint(equalTo: container.topAnchor, constant: 10.0).isActive = true
|
|
titlePreview.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -5.0).isActive = true
|
|
titlePreview.trailingAnchor.constraint(equalTo: container.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 + String.offset(), weight: .bold)
|
|
titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
|
|
|
|
let descPreview = UILabel()
|
|
let descPreview = UILabel()
|
|
@@ -1645,7 +1645,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
descPreview.topAnchor.constraint(equalTo: titlePreview.bottomAnchor).isActive = true
|
|
descPreview.topAnchor.constraint(equalTo: titlePreview.bottomAnchor).isActive = true
|
|
descPreview.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -5.0).isActive = true
|
|
descPreview.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -5.0).isActive = true
|
|
descPreview.text = description
|
|
descPreview.text = description
|
|
- descPreview.font = UIFont.systemFont(ofSize: 12.0)
|
|
|
|
|
|
+ descPreview.font = UIFont.systemFont(ofSize: 12.0 + String.offset())
|
|
descPreview.textColor = .gray
|
|
descPreview.textColor = .gray
|
|
descPreview.numberOfLines = 1
|
|
descPreview.numberOfLines = 1
|
|
|
|
|
|
@@ -1654,7 +1654,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
linkPreview.translatesAutoresizingMaskIntoConstraints = false
|
|
linkPreview.translatesAutoresizingMaskIntoConstraints = false
|
|
linkPreview.leadingAnchor.constraint(equalTo: imagePreview.trailingAnchor, constant: 5.0).isActive = true
|
|
linkPreview.leadingAnchor.constraint(equalTo: imagePreview.trailingAnchor, constant: 5.0).isActive = true
|
|
linkPreview.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -5.0).isActive = true
|
|
linkPreview.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -5.0).isActive = true
|
|
- linkPreview.font = UIFont.systemFont(ofSize: 10.0)
|
|
|
|
|
|
+ linkPreview.font = UIFont.systemFont(ofSize: 10.0 + String.offset())
|
|
linkPreview.textColor = .gray
|
|
linkPreview.textColor = .gray
|
|
linkPreview.numberOfLines = 1
|
|
linkPreview.numberOfLines = 1
|
|
|
|
|
|
@@ -1694,7 +1694,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
nameAudio.anchor(left: imageAudio.rightAnchor, right: container.rightAnchor, paddingLeft: 10, paddingRight: 10, centerY: container.centerYAnchor)
|
|
nameAudio.anchor(left: imageAudio.rightAnchor, right: container.rightAnchor, paddingLeft: 10, paddingRight: 10, centerY: container.centerYAnchor)
|
|
nameAudio.numberOfLines = 2
|
|
nameAudio.numberOfLines = 2
|
|
nameAudio.text = data.messageText.components(separatedBy: "|")[0]
|
|
nameAudio.text = data.messageText.components(separatedBy: "|")[0]
|
|
- nameAudio.font = .systemFont(ofSize: 16, weight: .medium)
|
|
|
|
|
|
+ nameAudio.font = .systemFont(ofSize: 16 + String.offset(), weight: .medium)
|
|
|
|
|
|
let nsDocumentDirectory = FileManager.SearchPathDirectory.documentDirectory
|
|
let nsDocumentDirectory = FileManager.SearchPathDirectory.documentDirectory
|
|
let nsUserDomainMask = FileManager.SearchPathDomainMask.userDomainMask
|
|
let nsUserDomainMask = FileManager.SearchPathDomainMask.userDomainMask
|
|
@@ -1797,7 +1797,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
titleView.leadingAnchor.constraint(equalTo: imageView.trailingAnchor, constant: 10.0),
|
|
titleView.leadingAnchor.constraint(equalTo: imageView.trailingAnchor, constant: 10.0),
|
|
titleView.trailingAnchor.constraint(equalTo: content.trailingAnchor, constant: -40.0),
|
|
titleView.trailingAnchor.constraint(equalTo: content.trailingAnchor, constant: -40.0),
|
|
])
|
|
])
|
|
- titleView.font = UIFont.systemFont(ofSize: 14, weight: .medium)
|
|
|
|
|
|
+ titleView.font = UIFont.systemFont(ofSize: 14 + String.offset(), weight: .medium)
|
|
|
|
|
|
let timeView = UILabel()
|
|
let timeView = UILabel()
|
|
let viewCounter = UIView()
|
|
let viewCounter = UIView()
|
|
@@ -1824,7 +1824,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
labelCounter.leadingAnchor.constraint(equalTo: viewCounter.leadingAnchor, constant: 2),
|
|
labelCounter.leadingAnchor.constraint(equalTo: viewCounter.leadingAnchor, constant: 2),
|
|
labelCounter.trailingAnchor.constraint(equalTo: viewCounter.trailingAnchor, constant: -2),
|
|
labelCounter.trailingAnchor.constraint(equalTo: viewCounter.trailingAnchor, constant: -2),
|
|
])
|
|
])
|
|
- labelCounter.font = UIFont.systemFont(ofSize: 11)
|
|
|
|
|
|
+ labelCounter.font = UIFont.systemFont(ofSize: 11 + String.offset())
|
|
if Int(data.counter)! > 99 {
|
|
if Int(data.counter)! > 99 {
|
|
labelCounter.text = "99+"
|
|
labelCounter.text = "99+"
|
|
} else {
|
|
} else {
|
|
@@ -1845,7 +1845,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
timeView.trailingAnchor.constraint(equalTo: content.trailingAnchor, constant: -20.0),
|
|
timeView.trailingAnchor.constraint(equalTo: content.trailingAnchor, constant: -20.0),
|
|
])
|
|
])
|
|
timeView.textColor = .gray
|
|
timeView.textColor = .gray
|
|
- timeView.font = UIFont.systemFont(ofSize: 14)
|
|
|
|
|
|
+ timeView.font = UIFont.systemFont(ofSize: 14 + String.offset())
|
|
|
|
|
|
let date = Date(milliseconds: Int64(data.serverDate) ?? 0)
|
|
let date = Date(milliseconds: Int64(data.serverDate) ?? 0)
|
|
let calendar = Calendar.current
|
|
let calendar = Calendar.current
|
|
@@ -1901,7 +1901,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
if data.fpin == idMe {
|
|
if data.fpin == idMe {
|
|
if data.lock == "1" {
|
|
if data.lock == "1" {
|
|
if data.messageScope == "4" {
|
|
if data.messageScope == "4" {
|
|
- stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12, weight: .medium)]))
|
|
|
|
|
|
+ stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12 + String.offset(), weight: .medium)]))
|
|
}
|
|
}
|
|
stringMessage.append(("🚫 _"+"You were deleted this message".localized()+"_").richText())
|
|
stringMessage.append(("🚫 _"+"You were deleted this message".localized()+"_").richText())
|
|
} else {
|
|
} else {
|
|
@@ -1925,7 +1925,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
stringMessage.append(imageStatusString)
|
|
stringMessage.append(imageStatusString)
|
|
stringMessage.append(NSAttributedString(string: " "))
|
|
stringMessage.append(NSAttributedString(string: " "))
|
|
if data.messageScope == "4" {
|
|
if data.messageScope == "4" {
|
|
- stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12, weight: .medium)]))
|
|
|
|
|
|
+ stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12 + String.offset(), weight: .medium)]))
|
|
}
|
|
}
|
|
stringMessage.append(attributeText)
|
|
stringMessage.append(attributeText)
|
|
}
|
|
}
|
|
@@ -1936,7 +1936,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
if components.count >= 2 {
|
|
if components.count >= 2 {
|
|
fullname = components.prefix(2).joined(separator: " ")
|
|
fullname = components.prefix(2).joined(separator: " ")
|
|
}
|
|
}
|
|
- stringMessage.append(NSAttributedString(string: fullname + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12, weight: .medium)]))
|
|
|
|
|
|
+ stringMessage.append(NSAttributedString(string: fullname + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12 + String.offset(), weight: .medium)]))
|
|
}
|
|
}
|
|
if data.lock == "1" {
|
|
if data.lock == "1" {
|
|
stringMessage.append(("🚫 _"+"This message was deleted".localized()+"_").richText())
|
|
stringMessage.append(("🚫 _"+"This message was deleted".localized()+"_").richText())
|
|
@@ -1976,7 +1976,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
|
|
case 1:
|
|
case 1:
|
|
cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifierGroup", for: indexPath)
|
|
cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifierGroup", for: indexPath)
|
|
var content = cell.defaultContentConfiguration()
|
|
var content = cell.defaultContentConfiguration()
|
|
- content.textProperties.font = UIFont.systemFont(ofSize: 14)
|
|
|
|
|
|
+ content.textProperties.font = UIFont.systemFont(ofSize: 14 + String.offset())
|
|
let group: Group
|
|
let group: Group
|
|
if isFiltering {
|
|
if isFiltering {
|
|
if indexPath.row == 0 {
|
|
if indexPath.row == 0 {
|