For contact threads, thread.name opened a sneaky transaction, which would sometimes cause a deadlock. This commit moves the name method to the contact manager and offers an explicit transaction flavor. There is still a sneaky transaction flavor used in some places where it's deemed dangerous to plumb through a transaction without further scrutiny.
34 lines
757 B
Objective-C
34 lines
757 B
Objective-C
//
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
extern const CGFloat kContactCellAvatarTextMargin;
|
|
|
|
@class SDSAnyReadTransaction;
|
|
@class SignalServiceAddress;
|
|
@class TSThread;
|
|
|
|
@interface ContactCellView : UIStackView
|
|
|
|
@property (nonatomic, nullable) NSString *accessoryMessage;
|
|
|
|
- (void)configureWithRecipientAddress:(SignalServiceAddress *)address;
|
|
|
|
- (void)configureWithThread:(TSThread *)thread transaction:(SDSAnyReadTransaction *)transaction;
|
|
|
|
- (void)prepareForReuse;
|
|
|
|
- (NSAttributedString *)verifiedSubtitle;
|
|
|
|
- (void)setAttributedSubtitle:(nullable NSAttributedString *)attributedSubtitle;
|
|
|
|
- (BOOL)hasAccessoryText;
|
|
|
|
- (void)setAccessoryView:(UIView *)accessoryView;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|