Merge branch 'charlesmchen/profileKeyIndicator' into release/3.8.0

This commit is contained in:
Matthew Chen 2020-04-13 10:31:58 -03:00
commit b4e8fefe32
2 changed files with 14 additions and 1 deletions

View File

@ -146,7 +146,7 @@ extension ConversationSettingsViewController {
let header = builder.build()
// This will only appear in internal, qa & dev builds.
// This will not appear in public builds.
if DebugFlags.groupsV2showV2Indicator {
let indicatorLabel = UILabel()
indicatorLabel.text = thread.isGroupV2Thread ? "v2" : "v1"
@ -208,6 +208,16 @@ extension ConversationSettingsViewController {
builder.addSubtitleLabel(attributedText: subtitle)
}
// This will not appear in public builds.
if DebugFlags.showProfileKeyIndicator {
let hasProfileKey = self.databaseStorage.uiRead { transaction in
self.profileManager.profileKeyData(for: recipientAddress, transaction: transaction) != nil
}
let subtitle = "Has Profile Key: \(hasProfileKey)"
builder.addSubtitleLabel(attributedText: subtitle.asAttributedString)
}
builder.addLastSubviews()
return builder.build()

View File

@ -302,4 +302,7 @@ public class DebugFlags: NSObject {
// bug we want to be able to test them using the debug UI.
@objc
public static let permissiveGroupUpdateInfoMessages = build.includes(.dev)
@objc
public static let showProfileKeyIndicator = build.includes(.qa)
}