|
|
@ -234,6 +234,7 @@ typedef enum : NSUInteger {
|
|
|
|
@property (nonatomic) ContactShareViewHelper *contactShareViewHelper;
|
|
|
|
@property (nonatomic) ContactShareViewHelper *contactShareViewHelper;
|
|
|
|
@property (nonatomic) NSTimer *reloadTimer;
|
|
|
|
@property (nonatomic) NSTimer *reloadTimer;
|
|
|
|
@property (nonatomic, nullable) NSDate *lastReloadDate;
|
|
|
|
@property (nonatomic, nullable) NSDate *lastReloadDate;
|
|
|
|
|
|
|
|
@property (nonatomic) BOOL didChangeTheme;
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
@ -352,6 +353,10 @@ typedef enum : NSUInteger {
|
|
|
|
selector:@selector(keyboardWillChangeFrame:)
|
|
|
|
selector:@selector(keyboardWillChangeFrame:)
|
|
|
|
name:UIKeyboardWillChangeFrameNotification
|
|
|
|
name:UIKeyboardWillChangeFrameNotification
|
|
|
|
object:nil];
|
|
|
|
object:nil];
|
|
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
|
|
|
|
selector:@selector(themeDidChange:)
|
|
|
|
|
|
|
|
name:ThemeDidChangeNotification
|
|
|
|
|
|
|
|
object:nil];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (BOOL)isGroupConversation
|
|
|
|
- (BOOL)isGroupConversation
|
|
|
@ -560,14 +565,7 @@ typedef enum : NSUInteger {
|
|
|
|
|
|
|
|
|
|
|
|
[self addNotificationListeners];
|
|
|
|
[self addNotificationListeners];
|
|
|
|
[self loadDraftInCompose];
|
|
|
|
[self loadDraftInCompose];
|
|
|
|
}
|
|
|
|
[self applyTheme];
|
|
|
|
|
|
|
|
|
|
|
|
- (void)loadView
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
[super loadView];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// make sure toolbar extends below iPhoneX home button.
|
|
|
|
|
|
|
|
self.view.backgroundColor = Theme.toolbarBackgroundColor;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)createContents
|
|
|
|
- (void)createContents
|
|
|
@ -589,7 +587,6 @@ typedef enum : NSUInteger {
|
|
|
|
self.collectionView.showsVerticalScrollIndicator = YES;
|
|
|
|
self.collectionView.showsVerticalScrollIndicator = YES;
|
|
|
|
self.collectionView.showsHorizontalScrollIndicator = NO;
|
|
|
|
self.collectionView.showsHorizontalScrollIndicator = NO;
|
|
|
|
self.collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
|
|
|
|
self.collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
|
|
|
|
self.collectionView.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
|
|
|
[self.view addSubview:self.collectionView];
|
|
|
|
[self.view addSubview:self.collectionView];
|
|
|
|
[self.collectionView autoPinEdgesToSuperviewEdges];
|
|
|
|
[self.collectionView autoPinEdgesToSuperviewEdges];
|
|
|
|
|
|
|
|
|
|
|
@ -1188,6 +1185,13 @@ typedef enum : NSUInteger {
|
|
|
|
[self becomeFirstResponder];
|
|
|
|
[self becomeFirstResponder];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (self.didChangeTheme) {
|
|
|
|
|
|
|
|
self.didChangeTheme = NO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self applyTheme];
|
|
|
|
|
|
|
|
[self.collectionView reloadData];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// `viewWillDisappear` is called whenever the view *starts* to disappear,
|
|
|
|
// `viewWillDisappear` is called whenever the view *starts* to disappear,
|
|
|
@ -4243,6 +4247,26 @@ typedef enum : NSUInteger {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)themeDidChange:(NSNotification *)notification
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self applyTheme];
|
|
|
|
|
|
|
|
[self.collectionView reloadData];
|
|
|
|
|
|
|
|
self.didChangeTheme = YES;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applyTheme
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// make sure toolbar extends below iPhoneX home button.
|
|
|
|
|
|
|
|
self.view.backgroundColor = Theme.toolbarBackgroundColor;
|
|
|
|
|
|
|
|
self.collectionView.backgroundColor = Theme.backgroundColor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self updateNavigationBarSubtitleLabel];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *)attachmentApproval didApproveAttachment:(SignalAttachment * _Nonnull)attachment
|
|
|
|
- (void)attachmentApproval:(AttachmentApprovalViewController *)attachmentApproval didApproveAttachment:(SignalAttachment * _Nonnull)attachment
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[self sendMessageAttachment:attachment];
|
|
|
|
[self sendMessageAttachment:attachment];
|
|
|
|