Signal-iOS/SignalMessaging/Views/ContactTableViewCell.h
Michael Kirk 45c4066a80 Fix deadlock with thread.name
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.
2019-08-23 18:45:23 -06:00

34 lines
864 B
Objective-C

//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class SDSAnyReadTransaction;
@class SignalServiceAddress;
@class TSThread;
@interface ContactTableViewCell : UITableViewCell
+ (NSString *)reuseIdentifier;
- (void)configureWithRecipientAddress:(SignalServiceAddress *)address;
- (void)configureWithThread:(TSThread *)thread transaction:(SDSAnyReadTransaction *)transaction;
// This method should be called _before_ the configure... methods.
- (void)setAccessoryMessage:(nullable NSString *)accessoryMessage;
// This method should be called _after_ the configure... methods.
- (void)setAttributedSubtitle:(nullable NSAttributedString *)attributedSubtitle;
- (NSAttributedString *)verifiedSubtitle;
- (BOOL)hasAccessoryText;
- (void)ows_setAccessoryView:(UIView *)accessoryView;
@end
NS_ASSUME_NONNULL_END