Commit f5f130d5 authored by Kevin Reynaldo's avatar Kevin Reynaldo
Browse files

• Updated version to 1.6.2

• Forced light mode appearance in base view controller
• Removed error pop up from get starred message IDs
• Added markLastMessageInRoomAsRead in markAllMessagesInRoomAsReadWithRoomID call
• Added unsupported message bubble
parent 8f1a02cd
......@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "TapTalk"
s.version = "1.6.1"
s.version = "1.6.2"
s.summary = "TapTalk.io is a complete in-app chat SDK and messaging API. TapTalk.io provides UI-based and code-based implementation & fully customizable."
s.homepage = "https://taptalk.io"
......
......@@ -2205,7 +2205,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
PRODUCT_BUNDLE_IDENTIFIER = io.TapTalk.TapTalk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
......@@ -2242,7 +2242,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
PRODUCT_BUNDLE_IDENTIFIER = io.TapTalk.TapTalk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
......
......@@ -65,6 +65,7 @@
#pragma mark - Time
+ (NSString *)stringFromTimeInterval:(NSTimeInterval)interval;
+ (NSString *)getMessageTimestampText:(NSNumber *)createdTime;
+ (NSNumber *)currentTimeInMillis;
#pragma mark - Null Handler
+ (NSString *)nullToEmptyString:(id)value;
......
......@@ -108,6 +108,10 @@ static const char kBundleKey = 0;
return messageDateString;
}
+ (NSNumber *)currentTimeInMillis {
return [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970] * 1000.0f];
}
#pragma mark - Null Handler
+ (NSString *)nullToEmptyString:(id)value {
NSString *emptyString = @"";
......
......@@ -998,6 +998,7 @@
failure:^(NSError *error) {
}];
[self markLastMessageInRoomAsReadWithRoomID:roomID];
}
- (void)markAllMessagesInRoomAsReadWithRoomID:(NSString *)roomID
......@@ -1012,6 +1013,28 @@
failure:^(NSError *error) {
failure(error);
}];
[self markLastMessageInRoomAsReadWithRoomID:roomID];
}
- (void)markLastMessageInRoomAsReadWithRoomID:(NSString *)roomID {
NSMutableArray *unreadRoomIDs = [[TAPDataManager getUnreadRoomIDs] mutableCopy];
if ([unreadRoomIDs containsObject:roomID]) {
[TAPDataManager getMessageWithRoomID:roomID lastMessageTimeStamp:[TAPUtil currentTimeInMillis] limitData:1 success:^(NSArray<TAPMessageModel *> *obtainedMessageArray) {
if ([obtainedMessageArray count] > 0) {
NSArray<TAPMessageModel *> *selectedMessageArray = @[[obtainedMessageArray objectAtIndex:0]];
[[TAPCoreMessageManager sharedManager] markMessagesAsRead:selectedMessageArray success:^(NSArray<NSString *> *updatedMessageIDs){
} failure:^(NSError *error) {
}];
[unreadRoomIDs removeObject:roomID];
[TAPDataManager setUnreadRoomIDs:unreadRoomIDs];
}
} failure:^(NSError *error) {
}];
}
}
- (void)getLocalMessagesWithRoomID:(NSString *)roomID
......
......@@ -213,6 +213,10 @@
- (void)handleTappedNotificationWithUserInfo:(NSDictionary *)userInfo {
TAPMessageModel *message = [TAPDataManager messageModelFromPayloadWithUserInfo:userInfo];
if (message == nil) {
return;
}
if ([self.delegate respondsToSelector:@selector(notificationManagerDidHandleTappedNotificationWithMessage:)]) {
[self.delegate notificationManagerDidHandleTappedNotificationWithMessage:message];
......
......@@ -61,6 +61,11 @@
//End Note
self.navigationController.navigationBar.translucent = NO;
// FIXME: OVERRIDE STYLE TO LIGHT (DARK MODE UI NOT HANDLED)
if (@available(iOS 13, *)) {
self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
}
- (void)viewDidUnload {
......
......@@ -1236,7 +1236,7 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
else if(indexPath.section == 1 || indexPath.section == 2 || indexPath.section == 3){
NSString *headerID = @"ShareMediaHeaderView";
NSString *headerID = @"headerView";
[collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:kind withReuseIdentifier:headerID];
UICollectionReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:headerID forIndexPath:indexPath];
......
......@@ -795,9 +795,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
self.starMessageIDArray = [starredMessageID mutableCopy];;
[self.tableView reloadData];
} failure:^(NSError *error) {
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error" title:NSLocalizedStringFromTableInBundle(@"Failed", nil, [TAPUtil currentBundle], @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
 
......@@ -947,6 +945,13 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
//Unread message identifier UI
return 42.0f;
}
// FIXME: TEMPORARY FIX FOR MEETTALK BUBBLE
else if (currentMessage.type == 8001 &&
([currentMessage.action isEqualToString:@"conference/info"] ||
[currentMessage.action isEqualToString:@"call/answer"])
) {
return 0.0f;
}
else {
tableView.estimatedRowHeight = 70.0f;
return UITableViewAutomaticDimension;
......@@ -1059,8 +1064,10 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
cell.contentView.tag = indexPath.row;
cell.userInteractionEnabled = YES;
cell.contentView.userInteractionEnabled = YES;
cell.type = TAPMyChatDeletedBubbleTableViewCellTypeDefault;
cell.delegate = self;
[cell showStatusLabel:NO animated:NO updateStatusIcon:NO message:message];
[cell setMessage:message];
return cell;
}
......@@ -1447,7 +1454,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
//check if custom bubble available
NSDictionary *cellDataDictionary = [[TAPCustomBubbleManager sharedManager] getCustomBubbleClassNameWithType:message.type];
if([cellDataDictionary count] > 0 && cellDataDictionary != nil) {
if ([cellDataDictionary count] > 0 && cellDataDictionary != nil) {
//if custom bubble from client available
NSString *cellName = [cellDataDictionary objectForKey:@"name"];
id userDelegate = [cellDataDictionary objectForKey:@"delegate"];
......@@ -1464,6 +1471,22 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
}
return cell;
}
else {
// Unsupported message type
[tableView registerNib:[TAPMyChatDeletedBubbleTableViewCell cellNib] forCellReuseIdentifier:[TAPMyChatDeletedBubbleTableViewCell description]];
TAPMyChatDeletedBubbleTableViewCell *cell = (TAPMyChatDeletedBubbleTableViewCell *)[tableView dequeueReusableCellWithIdentifier:[TAPMyChatDeletedBubbleTableViewCell description] forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.tag = indexPath.row;
cell.contentView.tag = indexPath.row;
cell.userInteractionEnabled = YES;
cell.contentView.userInteractionEnabled = YES;
cell.type = TAPMyChatDeletedBubbleTableViewCellTypeUnsupported;
cell.delegate = self;
[cell showStatusLabel:NO animated:NO updateStatusIcon:NO message:message];
[cell setMessage:message];
return cell;
}
}
}
}
......@@ -1478,6 +1501,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
cell.contentView.tag = indexPath.row;
cell.userInteractionEnabled = YES;
cell.contentView.userInteractionEnabled = YES;
cell.type = TAPYourChatDeletedBubbleTableViewCellTypeDefault;
cell.delegate = self;
[cell setMessage:message];
[cell showStatusLabel:NO animated:NO];
......@@ -1798,7 +1822,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
//check if custom bubble available
NSDictionary *cellDataDictionary = [[TAPCustomBubbleManager sharedManager] getCustomBubbleClassNameWithType:message.type];
if([cellDataDictionary count] > 0 && cellDataDictionary != nil) {
if ([cellDataDictionary count] > 0 && cellDataDictionary != nil) {
//if custom bubble from client available
NSString *cellName = [cellDataDictionary objectForKey:@"name"];
id userDelegate = [cellDataDictionary objectForKey:@"delegate"];
......@@ -1815,6 +1839,22 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
}
return cell;
}
else {
// Unsupported message type
[tableView registerNib:[TAPYourChatDeletedBubbleTableViewCell cellNib] forCellReuseIdentifier:[TAPYourChatDeletedBubbleTableViewCell description]];
TAPYourChatDeletedBubbleTableViewCell *cell = (TAPYourChatDeletedBubbleTableViewCell *)[tableView dequeueReusableCellWithIdentifier:[TAPYourChatDeletedBubbleTableViewCell description] forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.tag = indexPath.row;
cell.contentView.tag = indexPath.row;
cell.userInteractionEnabled = YES;
cell.contentView.userInteractionEnabled = YES;
cell.type = TAPYourChatDeletedBubbleTableViewCellTypeUnsupported;
cell.delegate = self;
[cell setMessage:message];
[cell showStatusLabel:NO animated:NO];
return cell;
}
}
}
}
......
......@@ -410,15 +410,6 @@
[self updateCellDataAtIndexPath:cellIndexPath updateUnreadBubble:YES];
[[TAPCoreMessageManager sharedManager] markAllMessagesInRoomAsReadWithRoomID:selectedRoom.roomID];
// [[TAPCoreMessageManager sharedManager] markMessageAsRead:selectedMessage];
NSArray<TAPMessageModel *> *selectedMessageArray = @[selectedMessage];
[[TAPCoreMessageManager sharedManager] markMessagesAsRead:selectedMessageArray success:^(NSArray<NSString *> *updatedMessageIDs){
//[self callApiGetMarkedUnreadIDs];
} failure:^(NSError *error) {
}];
}
else{
[self.unreadRoomIDs addObject:selectedRoom.roomID];
......
......@@ -10,6 +10,11 @@
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, TAPMyChatDeletedBubbleTableViewCellType) {
TAPMyChatDeletedBubbleTableViewCellTypeDefault = 0,
TAPMyChatDeletedBubbleTableViewCellTypeUnsupported = 1,
};
@protocol TAPMyChatDeletedBubbleTableViewCellDelegate <NSObject>
- (void)myChatDeletedBubbleViewDidTapped:(TAPMessageModel *)tappedMessage;
......@@ -20,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) id<TAPMyChatDeletedBubbleTableViewCellDelegate> delegate;
@property (strong, nonatomic) TAPMessageModel *message;
@property (nonatomic) TAPMyChatDeletedBubbleTableViewCellType type;
- (void)setMessage:(TAPMessageModel *)message;
- (void)receiveSentEvent;
......
......@@ -25,6 +25,8 @@
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *sendingIconBottomConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *statusIconBottomConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *statusIconRightConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *deletedIconImageViewWidthConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *deletedIconImageViewTrailingConstraint;
- (IBAction)chatBubbleButtonDidTapped:(id)sender;
- (void)setBubbleCellStyle;
......@@ -61,9 +63,14 @@
self.statusLabelTopConstraint.constant = 0.0f;
self.statusLabelHeightConstraint.constant = 0.0f;
self.statusLabel.alpha = 0.0f;
self.statusIconImageView.alpha = 0.0f;
self.sendingIconImageView.alpha = 0.0f;
self.sendingIconLeftConstraint.constant = 4.0f;
self.sendingIconBottomConstraint.constant = -5.0f;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = @"";
[self setBubbleCellStyle];
[self.contentView layoutIfNeeded];
}
......@@ -90,12 +97,8 @@
self.statusLabel.textColor = statusLabelColor;
self.statusLabel.font = statusLabelFont;
UIImage *sendingImage = [UIImage imageNamed:@"TAPIconSending" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
self.sendingIconImageView.image = sendingImage;
UIImage *deletedImage = [UIImage imageNamed:@"TAPIconBlock" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
deletedImage = [deletedImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconDeletedRightMessageBubble]];
self.deletedIconImageView.image = deletedImage;
// UIImage *sendingImage = [UIImage imageNamed:@"TAPIconSending" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
// self.sendingIconImageView.image = sendingImage;
}
- (void)setMessage:(TAPMessageModel *)message {
......@@ -105,20 +108,39 @@
// _message = message;
[super setMessage:message];
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"You deleted this message.", nil, [TAPUtil currentBundle], @"");
if (self.type == TAPMyChatDeletedBubbleTableViewCellTypeDefault) {
UIImage *deletedImage = [UIImage imageNamed:@"TAPIconBlock" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
deletedImage = [deletedImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconDeletedRightMessageBubble]];
self.deletedIconImageView.image = deletedImage;
self.deletedIconImageViewWidthConstraint.constant = 16.0f;
self.deletedIconImageViewTrailingConstraint.constant = 4.0f;
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"You deleted this message.", nil, [TAPUtil currentBundle], @"");
}
else if (self.type == TAPMyChatDeletedBubbleTableViewCellTypeUnsupported) {
self.deletedIconImageView.image = nil;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"This message type is unsupported in the current app version.", nil, [TAPUtil currentBundle], @"");
}
else {
self.deletedIconImageView.image = nil;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = @"";
}
}
- (void)receiveSentEvent {
[super receiveSentEvent];
// [super receiveSentEvent];
}
- (void)receiveDeliveredEvent {
[super receiveDeliveredEvent];
// [super receiveDeliveredEvent];
}
- (void)receiveReadEvent {
[super receiveReadEvent];
// [super receiveReadEvent];
}
- (void)showStatusLabel:(BOOL)isShowed animated:(BOOL)animated updateStatusIcon:(BOOL)updateStatusIcon message:(TAPMessageModel *)message {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
......@@ -32,16 +32,16 @@
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wfl-OL-tvu">
<rect key="frame" x="125" y="63" width="16" height="16"/>
<rect key="frame" x="124.5" y="63" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="9c2-E0-wGG"/>
<constraint firstAttribute="height" constant="16" id="IZ6-gH-8sM"/>
</constraints>
</imageView>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZOq-VC-kEi">
<rect key="frame" x="143" y="0.0" width="216" height="79"/>
<rect key="frame" x="142.5" y="0.0" width="216.5" height="79"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TAPIconBlock" translatesAutoresizingMaskIntoConstraints="NO" id="k9P-XN-Ti0">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="k9P-XN-Ti0">
<rect key="frame" x="10" y="31.5" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="S0M-93-zKZ"/>
......@@ -49,14 +49,14 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="You deleted this message." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8pH-cI-SAU" customClass="ZSWTappableLabel">
<rect key="frame" x="30" y="10" width="176" height="59"/>
<rect key="frame" x="30" y="10" width="176.5" height="59"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="PTRootUI-Regular" family="PT Root UI" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7K0-Qh-Vwr">
<rect key="frame" x="0.0" y="0.0" width="216" height="79"/>
<rect key="frame" x="0.0" y="0.0" width="216.5" height="79"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal">
<color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......@@ -112,6 +112,8 @@
<outlet property="chatBubbleButton" destination="7K0-Qh-Vwr" id="KDL-QI-7oX"/>
<outlet property="chatBubbleRightConstraint" destination="0T2-Zt-l1t" id="YMk-yn-eJX"/>
<outlet property="deletedIconImageView" destination="k9P-XN-Ti0" id="W9R-iv-Miz"/>
<outlet property="deletedIconImageViewTrailingConstraint" destination="gZd-0y-usd" id="9DL-Xl-Vep"/>
<outlet property="deletedIconImageViewWidthConstraint" destination="S0M-93-zKZ" id="hyz-qN-ncq"/>
<outlet property="sendingIconBottomConstraint" destination="Vfm-Ob-uua" id="kmE-0V-N2K"/>
<outlet property="sendingIconImageView" destination="4wh-Pn-xVV" id="TNl-4u-Sps"/>
<outlet property="sendingIconLeftConstraint" destination="fQe-5V-ktF" id="6AS-zx-BBq"/>
......@@ -126,7 +128,6 @@
</tableViewCell>
</objects>
<resources>
<image name="TAPIconBlock" width="16" height="16"/>
<image name="TAPIconSending" width="20" height="20"/>
</resources>
</document>
......@@ -10,6 +10,11 @@
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, TAPYourChatDeletedBubbleTableViewCellType) {
TAPYourChatDeletedBubbleTableViewCellTypeDefault = 0,
TAPYourChatDeletedBubbleTableViewCellTypeUnsupported = 1,
};
@protocol TAPYourChatDeletedBubbleTableViewCellDelegate <NSObject>
- (void)yourChatDeletedBubbleViewDidTapped:(TAPMessageModel *)tappedMessage;
......@@ -21,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) id<TAPYourChatDeletedBubbleTableViewCellDelegate> delegate;
@property (weak, nonatomic) TAPMessageModel *message;
@property (nonatomic) TAPYourChatDeletedBubbleTableViewCellType type;
- (void)setMessage:(TAPMessageModel *)message;
- (void)showStatusLabel:(BOOL)isShowed animated:(BOOL)animated;
......
......@@ -30,6 +30,8 @@
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *senderProfileImageButtonWidthConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *senderNameTopConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *senderNameHeightConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *deletedIconImageViewWidthConstraint;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *deletedIconImageViewTrailingConstraint;
- (IBAction)chatBubbleButtonDidTapped:(id)sender;
- (IBAction)senderProfileImageButtonDidTapped:(id)sender;
......@@ -70,11 +72,13 @@
[super prepareForReuse];
self.statusLabelTopConstraint.constant = 0.0f;
self.statusLabelHeightConstraint.constant = 0.0f;
[self.contentView layoutIfNeeded];
self.statusLabel.alpha = 0.0f;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = @"";
[self setBubbleCellStyle];
[self showSenderInfo:NO];
[self.contentView layoutIfNeeded];
}
#pragma mark - Custom Method
......@@ -108,9 +112,6 @@
self.senderNameLabel.font = senderNameLabelFont;
self.senderNameLabel.textColor = senderNameLabelColor;
UIImage *deletedImage = [UIImage imageNamed:@"TAPIconBlock" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
deletedImage = [deletedImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconDeletedLeftMessageBubble]];
self.deletedIconImageView.image = deletedImage;
}
- (void)setMessage:(TAPMessageModel *)message {
......@@ -120,7 +121,26 @@
_message = message;
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"This message was deleted.", nil, [TAPUtil currentBundle], @"");
if (self.type == TAPYourChatDeletedBubbleTableViewCellTypeDefault) {
UIImage *deletedImage = [UIImage imageNamed:@"TAPIconBlock" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
deletedImage = [deletedImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconDeletedLeftMessageBubble]];
self.deletedIconImageView.image = deletedImage;
self.deletedIconImageViewWidthConstraint.constant = 16.0f;
self.deletedIconImageViewTrailingConstraint.constant = 4.0f;
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"This message was deleted.", nil, [TAPUtil currentBundle], @"");
}
else if (self.type == TAPYourChatDeletedBubbleTableViewCellTypeUnsupported) {
self.deletedIconImageView.image = nil;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = NSLocalizedStringFromTableInBundle(@"This message type is unsupported in the current app version.", nil, [TAPUtil currentBundle], @"");
}
else {
self.deletedIconImageView.image = nil;
self.deletedIconImageViewWidthConstraint.constant = 0.0f;
self.deletedIconImageViewTrailingConstraint.constant = 0.0f;
self.bubbleLabel.text = @"";
}
//CS NOTE - check chat room type, show sender info if group type
if (message.room.type == RoomTypeGroup || message.room.type == RoomTypeTransaction) {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -75,7 +75,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qkd-U2-OpQ">
<rect key="frame" x="50" y="0.0" width="221.5" height="95"/>
<rect key="frame" x="50" y="0.0" width="222" height="95"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TAPIconBlock" translatesAutoresizingMaskIntoConstraints="NO" id="KBX-91-s0M">
<rect key="frame" x="10" y="50" width="16" height="16"/>
......@@ -85,7 +85,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZzA-ee-IEA">
<rect key="frame" x="10" y="10" width="201.5" height="18"/>
<rect key="frame" x="10" y="10" width="202" height="18"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="t3p-l8-40F"/>
......@@ -95,14 +95,14 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="This message was deleted." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Pq-dc-vOe" customClass="ZSWTappableLabel">
<rect key="frame" x="30" y="31" width="181.5" height="54"/>
<rect key="frame" x="30" y="31" width="182" height="54"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="PTRootUI-Regular" family="PT Root UI" pointSize="15"/>
<color key="textColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.17254901959999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" alpha="0.0" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0x4-Nb-yFw">
<rect key="frame" x="0.0" y="0.0" width="221.5" height="95"/>
<rect key="frame" x="0.0" y="0.0" width="222" height="95"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<action selector="chatBubbleButtonDidTapped:" destination="WHg-h0-VPS" eventType="touchUpInside" id="5Ar-qo-zef"/>
......@@ -156,6 +156,8 @@
<outlet property="bubbleView" destination="Qkd-U2-OpQ" id="g8k-ws-gD7"/>
<outlet property="chatBubbleButton" destination="0x4-Nb-yFw" id="3qY-e5-D5G"/>
<outlet property="deletedIconImageView" destination="KBX-91-s0M" id="Pnb-o3-rhd"/>
<outlet property="deletedIconImageViewTrailingConstraint" destination="GNE-Ox-QQ7" id="DNS-LS-GwF"/>
<outlet property="deletedIconImageViewWidthConstraint" destination="ncn-JI-OZ7" id="h0f-IY-8qn"/>
<outlet property="senderImageView" destination="mE4-dQ-sxV" id="8uJ-ed-0yj"/>
<outlet property="senderImageViewTrailingConstraint" destination="RUp-tg-f6C" id="7Au-kO-xKM"/>
<outlet property="senderImageViewWidthConstraint" destination="zJT-Rj-CyN" id="TY5-Nm-xER"/>
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment