session-ios/Signal/src/views/OWSOutgoingMessageCollectionViewCell.m
Michael Kirk d3c2f44aeb Exclude extra data detectors.
Data detectors work by matching local text against a series of local
matchers. No network activity is required. Some of the data detectors
are really useful (e.g. a link, or being able to copy a phone number).

Some aren't very useful, e.g. pop culture references, and seeing things
underlined is giving people the false impression that their data is
being inspected remotely.

// FREEBIE
2016-11-14 08:58:22 -05:00

54 lines
1.4 KiB
Objective-C

// Created by Michael Kirk on 9/28/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
#import "OWSOutgoingMessageCollectionViewCell.h"
#import "OWSExpirationTimerView.h"
NS_ASSUME_NONNULL_BEGIN
@interface OWSOutgoingMessageCollectionViewCell ()
@property (strong, nonatomic) IBOutlet OWSExpirationTimerView *expirationTimerView;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *expirationTimerViewWidthConstraint;
@end
@implementation OWSOutgoingMessageCollectionViewCell
- (void)awakeFromNib
{
[super awakeFromNib];
self.expirationTimerViewWidthConstraint.constant = 0.0;
}
- (void)prepareForReuse
{
[super prepareForReuse];
self.mediaView.alpha = 1.0;
self.expirationTimerViewWidthConstraint.constant = 0.0f;
}
- (UIColor *)ows_textColor
{
return [UIColor whiteColor];
}
// pragma mark - OWSExpirableMessageView
- (void)startExpirationTimerWithExpiresAtSeconds:(uint64_t)expiresAtSeconds
initialDurationSeconds:(uint32_t)initialDurationSeconds
{
self.expirationTimerViewWidthConstraint.constant = OWSExpirableMessageViewTimerWidth;
[self.expirationTimerView startTimerWithExpiresAtSeconds:expiresAtSeconds
initialDurationSeconds:initialDurationSeconds];
}
- (void)stopExpirationTimer
{
[self.expirationTimerView stopTimer];
}
@end
NS_ASSUME_NONNULL_END