|
|
@ -38,11 +38,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#define SHOW_COLOR_PICKER
|
|
|
|
|
|
|
|
|
|
|
|
const CGFloat kIconViewLength = 24;
|
|
|
|
const CGFloat kIconViewLength = 24;
|
|
|
|
|
|
|
|
|
|
|
|
@interface OWSConversationSettingsViewController () <ContactEditingDelegate,
|
|
|
|
@interface OWSConversationSettingsViewController () <ContactEditingDelegate,
|
|
|
|
ContactsViewHelperDelegate,
|
|
|
|
ContactsViewHelperDelegate,
|
|
|
|
|
|
|
|
#ifdef SHOW_COLOR_PICKER
|
|
|
|
ColorPickerDelegate,
|
|
|
|
ColorPickerDelegate,
|
|
|
|
|
|
|
|
#endif
|
|
|
|
OWSSheetViewControllerDelegate>
|
|
|
|
OWSSheetViewControllerDelegate>
|
|
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) TSThread *thread;
|
|
|
|
@property (nonatomic) TSThread *thread;
|
|
|
@ -59,7 +63,9 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
@property (nonatomic, readonly) ContactsViewHelper *contactsViewHelper;
|
|
|
|
@property (nonatomic, readonly) ContactsViewHelper *contactsViewHelper;
|
|
|
|
@property (nonatomic, readonly) UIImageView *avatarView;
|
|
|
|
@property (nonatomic, readonly) UIImageView *avatarView;
|
|
|
|
@property (nonatomic, readonly) UILabel *disappearingMessagesDurationLabel;
|
|
|
|
@property (nonatomic, readonly) UILabel *disappearingMessagesDurationLabel;
|
|
|
|
|
|
|
|
#ifdef SHOW_COLOR_PICKER
|
|
|
|
@property (nonatomic) OWSColorPicker *colorPicker;
|
|
|
|
@property (nonatomic) OWSColorPicker *colorPicker;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
@ -250,8 +256,10 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
[[OWSDisappearingMessagesConfiguration alloc] initDefaultWithThreadId:self.thread.uniqueId];
|
|
|
|
[[OWSDisappearingMessagesConfiguration alloc] initDefaultWithThreadId:self.thread.uniqueId];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SHOW_COLOR_PICKER
|
|
|
|
self.colorPicker = [[OWSColorPicker alloc] initWithThread:self.thread];
|
|
|
|
self.colorPicker = [[OWSColorPicker alloc] initWithThread:self.thread];
|
|
|
|
self.colorPicker.delegate = self;
|
|
|
|
self.colorPicker.delegate = self;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
[self updateTableContents];
|
|
|
|
[self updateTableContents];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -465,6 +473,7 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
customRowHeight:UITableViewAutomaticDimension
|
|
|
|
customRowHeight:UITableViewAutomaticDimension
|
|
|
|
actionBlock:nil]];
|
|
|
|
actionBlock:nil]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef SHOW_COLOR_PICKER
|
|
|
|
[mainSection
|
|
|
|
[mainSection
|
|
|
|
addItem:[OWSTableItem
|
|
|
|
addItem:[OWSTableItem
|
|
|
|
itemWithCustomCellBlock:^{
|
|
|
|
itemWithCustomCellBlock:^{
|
|
|
@ -479,6 +488,7 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
actionBlock:^{
|
|
|
|
actionBlock:^{
|
|
|
|
[weakSelf showColorPicker];
|
|
|
|
[weakSelf showColorPicker];
|
|
|
|
}]];
|
|
|
|
}]];
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
[contents addSection:mainSection];
|
|
|
|
[contents addSection:mainSection];
|
|
|
|
|
|
|
|
|
|
|
@ -1297,6 +1307,8 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - ColorPickerDelegate
|
|
|
|
#pragma mark - ColorPickerDelegate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SHOW_COLOR_PICKER
|
|
|
|
|
|
|
|
|
|
|
|
- (void)showColorPicker
|
|
|
|
- (void)showColorPicker
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OWSSheetViewController *sheetViewController = self.colorPicker.sheetViewController;
|
|
|
|
OWSSheetViewController *sheetViewController = self.colorPicker.sheetViewController;
|
|
|
@ -1329,6 +1341,8 @@ const CGFloat kIconViewLength = 24;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - OWSSheetViewController
|
|
|
|
#pragma mark - OWSSheetViewController
|
|
|
|
|
|
|
|
|
|
|
|
- (void)sheetViewControllerRequestedDismiss:(OWSSheetViewController *)sheetViewController
|
|
|
|
- (void)sheetViewControllerRequestedDismiss:(OWSSheetViewController *)sheetViewController
|
|
|
|