Don't show Session ID in conversation title view

pull/261/head
nielsandriesse 5 years ago
parent 3a20e37896
commit 724d3c4497

@ -159,13 +159,6 @@ final class ConversationTitleView : UIView {
@objc func updateSubtitleForCurrentStatus() { @objc func updateSubtitleForCurrentStatus() {
DispatchQueue.main.async { DispatchQueue.main.async {
self.subtitleLabel.isHidden = false self.subtitleLabel.isHidden = false
switch self.currentStatus {
case .calculatingPoW: self.subtitleLabel.text = NSLocalizedString("Encrypting message", comment: "")
case .routing: self.subtitleLabel.text = NSLocalizedString("Tracing a path", comment: "")
case .messageSending: self.subtitleLabel.text = NSLocalizedString("Sending message", comment: "")
case .messageSent: self.subtitleLabel.text = NSLocalizedString("Message sent securely", comment: "")
case .messageFailed: self.subtitleLabel.text = NSLocalizedString("Message failed to send", comment: "")
case nil:
let subtitle = NSMutableAttributedString() let subtitle = NSMutableAttributedString()
if let muteEndDate = self.thread.mutedUntilDate, self.thread.isMuted { if let muteEndDate = self.thread.mutedUntilDate, self.thread.isMuted {
subtitle.append(NSAttributedString(string: "\u{e067} ", attributes: [ .font : UIFont.ows_elegantIconsFont(10), .foregroundColor : Colors.unimportant ])) subtitle.append(NSAttributedString(string: "\u{e067} ", attributes: [ .font : UIFont.ows_elegantIconsFont(10), .foregroundColor : Colors.unimportant ]))
@ -193,13 +186,11 @@ final class ConversationTitleView : UIView {
} else { } else {
self.subtitleLabel.isHidden = true self.subtitleLabel.isHidden = true
} }
} else if let hexEncodedPublicKey = (self.thread as? TSContactThread)?.contactIdentifier(), ECKeyPair.isValidHexEncodedPublicKey(candidate: hexEncodedPublicKey) { }
subtitle.append(NSAttributedString(string: hexEncodedPublicKey)) else {
} else {
self.subtitleLabel.isHidden = true self.subtitleLabel.isHidden = true
} }
self.subtitleLabel.attributedText = subtitle self.subtitleLabel.attributedText = subtitle
}
self.titleLabel.font = .boldSystemFont(ofSize: self.subtitleLabel.isHidden ? Values.veryLargeFontSize : Values.mediumFontSize) self.titleLabel.font = .boldSystemFont(ofSize: self.subtitleLabel.isHidden ? Values.veryLargeFontSize : Values.mediumFontSize)
} }
} }

@ -15,7 +15,7 @@ public final class Values : NSObject {
@objc public static let smallFontSize = isIPhone5OrSmaller ? CGFloat(13) : CGFloat(15) @objc public static let smallFontSize = isIPhone5OrSmaller ? CGFloat(13) : CGFloat(15)
@objc public static let mediumFontSize = isIPhone5OrSmaller ? CGFloat(15) : CGFloat(17) @objc public static let mediumFontSize = isIPhone5OrSmaller ? CGFloat(15) : CGFloat(17)
@objc public static let largeFontSize = isIPhone5OrSmaller ? CGFloat(20) : CGFloat(22) @objc public static let largeFontSize = isIPhone5OrSmaller ? CGFloat(20) : CGFloat(22)
@objc public static let veryLargeFontSize = isIPhone5OrSmaller ? CGFloat(25) : CGFloat(27) @objc public static let veryLargeFontSize = isIPhone5OrSmaller ? CGFloat(24) : CGFloat(26)
@objc public static let massiveFontSize = CGFloat(50) @objc public static let massiveFontSize = CGFloat(50)
// MARK: - Element Sizes // MARK: - Element Sizes

Loading…
Cancel
Save