mirror of https://github.com/oxen-io/session-ios
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. // FREEBIEpull/1/head
parent
fbcf5fbf07
commit
d3c2f44aeb
@ -0,0 +1,14 @@
|
||||
// Created by Michael Kirk on 11/13/16.
|
||||
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
||||
|
||||
#import <JSQMessagesViewController/JSQMessagesCollectionViewCell.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface JSQMessagesCollectionViewCell (OWS)
|
||||
|
||||
- (void)ows_didLoad;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,31 @@
|
||||
// Created by Michael Kirk on 11/13/16.
|
||||
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
||||
|
||||
#import "JSQMessagesCollectionViewCell+OWS.h"
|
||||
#import "UIColor+OWS.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation JSQMessagesCollectionViewCell (OWS)
|
||||
|
||||
- (UIColor *)ows_textColor
|
||||
{
|
||||
return [UIColor ows_blackColor];
|
||||
}
|
||||
|
||||
- (void)ows_didLoad
|
||||
{
|
||||
self.textView.textColor = self.ows_textColor;
|
||||
self.textView.linkTextAttributes = @{
|
||||
NSForegroundColorAttributeName : self.ows_textColor,
|
||||
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle | NSUnderlinePatternSolid)
|
||||
};
|
||||
|
||||
self.textView.dataDetectorTypes
|
||||
= (UIDataDetectorTypePhoneNumber | UIDataDetectorTypeLink | UIDataDetectorTypeAddress
|
||||
| UIDataDetectorTypeCalendarEvent);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Loading…
Reference in New Issue