Commit 85d6249b authored by Kevin Reynaldo's avatar Kevin Reynaldo
Browse files

• Updated version to 1.7.1

• Fixed unreadRoomIDs in preference not updated when calling TapCore
• Added removeUnreadMarkFromChatRoom and removeUnreadMarkFromChatRooms method to TapCoreRoomListManager
parent 866363d4
......@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "TapTalk"
s.version = "1.7.0"
s.version = "1.7.1"
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"
......
......@@ -2237,7 +2237,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.7.0;
MARKETING_VERSION = 1.7.1;
PRODUCT_BUNDLE_IDENTIFIER = io.TapTalk.TapTalk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
......@@ -2274,7 +2274,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.7.0;
MARKETING_VERSION = 1.7.1;
PRODUCT_BUNDLE_IDENTIFIER = io.TapTalk.TapTalk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
......
......@@ -43,7 +43,6 @@
}
- (void) audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag{
[TAPDataManager setCurrentVoicePlayingFilePath:@""];
if ([self.delegate respondsToSelector:@selector(finishAudioPlay)]) {
[self.delegate finishAudioPlay];
}
......@@ -78,7 +77,6 @@
}
- (void)stopPlayer {
[TAPDataManager setCurrentVoicePlayingFilePath:@""];
[self.player stop];
}
......@@ -87,12 +85,10 @@
}
- (void)pausePlayer {
[TAPDataManager setCurrentVoicePlayingFilePath:@""];
[self.player pause];
}
- (void)resumePlayer {
[TAPDataManager setCurrentVoicePlayingFilePath:self.filePath];
if ([self.delegate respondsToSelector:@selector(startAudioPlay:)]) {
[self.delegate startAudioPlay:self.player.duration];
}
......@@ -101,7 +97,6 @@
- (void)playAudio:(NSString *)filePath {
self.filePath = filePath;
[TAPDataManager setCurrentVoicePlayingFilePath:filePath];
NSURL *url = [NSURL fileURLWithPath:filePath];
AVAudioSession *session = [AVAudioSession sharedInstance];
......@@ -120,7 +115,6 @@
- (void)setupPlayerAudio:(NSString *)filePath {
self.filePath = filePath;
[TAPDataManager setCurrentVoicePlayingFilePath:filePath];
NSURL *url = [NSURL fileURLWithPath:filePath];
AVAudioSession *session = [AVAudioSession sharedInstance];
......
......@@ -1072,7 +1072,12 @@
failure:^(NSError *error) {
}];
[self markLastMessageInRoomAsReadWithRoomID:roomID];
[[TAPCoreRoomListManager sharedManager] removeUnreadMarkFromChatRoom:roomID success:^{
}
failure:^(NSError * _Nonnull error) {
}];
}
- (void)markAllMessagesInRoomAsReadWithRoomID:(NSString *)roomID
......@@ -1082,35 +1087,45 @@
[TAPDataManager getDatabaseUnreadMessagesInRoomWithRoomID:roomID
activeUserID:[TAPChatManager sharedManager].activeUser.userID
success:^(NSArray *unreadMessages) {
[self markMessagesAsRead:unreadMessages success:success failure:failure];
if ([unreadMessages count] == 0) {
success([NSArray array]);
}
else {
[self markMessagesAsRead:unreadMessages success:success failure:failure];
}
}
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) {
}];
[[TAPCoreRoomListManager sharedManager] removeUnreadMarkFromChatRoom:roomID success:^{
}
failure:^(NSError * _Nonnull error) {
}];
}
//- (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
success:(void (^)(NSArray <TAPMessageModel *> *messageArray))success
failure:(void (^)(NSError *error))failure {
......
......@@ -28,8 +28,14 @@ NS_ASSUME_NONNULL_BEGIN
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;
- (void)markChatRoomsAsUnreadWithRoomID:(NSArray<NSString *> *)roomIDs
success:(void (^)())success
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;
- (void)removeUnreadMarkFromChatRoom:(NSString *)roomID
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;
- (void)removeUnreadMarkFromChatRooms:(NSArray<NSString *> *)roomIDs
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;
- (void)getMarkedAsUnreadChatRoomListWithSuccess:(void (^)(NSArray *unreadRoomIDs))success
failure:(void (^)(NSError *error))failure;
......
......@@ -333,6 +333,109 @@
}];
}
- (void)removeUnreadMarkFromChatRoom:(NSString *)roomID
success:(void (^)())success
failure:(void (^)(NSError *error))failure {
NSMutableArray<NSString *> *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) {
[unreadRoomIDs removeObject:roomID];
[TAPDataManager setUnreadRoomIDs:unreadRoomIDs];
success();
}
failure:^(NSError *error) {
failure(error);
}];
}
else {
NSError *localizedError = [NSError errorWithDomain:@"Chat Room Not Found"
code:90404
userInfo:@{@"message": @"The selected chat room is not marked as unread."}];
failure(localizedError);
}
} failure:^(NSError *error) {
failure(error);
}];
}
else {
NSError *localizedError = [NSError errorWithDomain:@"Chat Room Not Found"
code:90404
userInfo:@{@"message": @"The selected chat room is not marked as unread."}];
failure(localizedError);
}
}
- (void)removeUnreadMarkFromChatRooms:(NSArray<NSString *> *)roomIDs
success:(void (^)())success
failure:(void (^)(NSError *error))failure {
NSMutableArray<NSString *> *unreadRoomIDs = [[TAPDataManager getUnreadRoomIDs] mutableCopy];
NSMutableArray<TAPMessageModel *> *unreadRoomMessages = [NSMutableArray array];
__block NSInteger count = 0;
for (NSString *roomID in roomIDs) {
if ([unreadRoomIDs containsObject:roomID]) {
[TAPDataManager getMessageWithRoomID:roomID lastMessageTimeStamp:[TAPUtil currentTimeInMillis] limitData:1 success:^(NSArray<TAPMessageModel *> *obtainedMessageArray) {
if ([obtainedMessageArray count] > 0) {
[unreadRoomMessages addObject:[obtainedMessageArray objectAtIndex:0]];
}
if (++count == [roomIDs count]) {
[self markUnreadChatRoomMessagesAsRead:unreadRoomMessages unreadRoomIDs:unreadRoomIDs success:^{
success();
} failure:^(NSError *error) {
failure(error);
}];
}
} failure:^(NSError *error) {
if (++count == [roomIDs count]) {
[self markUnreadChatRoomMessagesAsRead:unreadRoomMessages unreadRoomIDs:unreadRoomIDs success:^{
success();
} failure:^(NSError *error) {
failure(error);
}];
}
}];
}
else if (++count == [roomIDs count]) {
[self markUnreadChatRoomMessagesAsRead:unreadRoomMessages unreadRoomIDs:unreadRoomIDs success:^{
success();
} failure:^(NSError *error) {
failure(error);
}];
}
}
}
- (void)markUnreadChatRoomMessagesAsRead:(NSArray<TAPMessageModel *> *)unreadList
unreadRoomIDs:(NSMutableArray<NSString *> *)unreadRoomIDs
success:(void (^)())success
failure:(void (^)(NSError *error))failure {
if ([unreadList count] > 0) {
[[TAPCoreMessageManager sharedManager] markMessagesAsRead:unreadList
success:^(NSArray<NSString *> *updatedMessageIDs) {
[unreadRoomIDs removeObjectsInArray:unreadList];
[TAPDataManager setUnreadRoomIDs:unreadRoomIDs];
success();
}
failure:^(NSError *error) {
failure(error);
}];
}
else {
NSError *localizedError = [NSError errorWithDomain:@"Chat Room Not Found"
code:90404
userInfo:@{@"message": @"The selected chat rooms are not marked as unread."}];
failure(localizedError);
}
}
- (void)getMarkedAsUnreadChatRoomListWithSuccess:(void (^)(NSArray *unreadRoomIDs))success failure:(void (^)(NSError *error))failure {
[TAPDataManager callAPIGetMarkedAsUnreadChatRoomList:^(NSArray *unreadRoomIDs) {
success(unreadRoomIDs);
......
......@@ -31,8 +31,6 @@
+ (TAPCoreConfigsModel *)getCoreConfigs;
+ (void)setUnreadRoomIDs:(NSArray *)roomIDs;
+ (NSArray *)getUnreadRoomIDs;
+ (void)setCurrentVoicePlayingFilePath:(NSString *)message;
+ (NSString *)getCurrentVoicePlayingFilePath;
+ (void)updateMessageToFailedWhenClosedInDatabase;
......
......@@ -1484,18 +1484,6 @@
return roomIDs;
}
+ (void)setCurrentVoicePlayingFilePath:(TAPMessageModel *)message{
[[NSUserDefaults standardUserDefaults] setSecureObject:message forKey:TAP_PREFS_CURRENT_VOICE_MESSAGE_PLAYING];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+ (TAPMessageModel *)getCurrentVoicePlayingFilePath{
TAPMessageModel *message = [[NSUserDefaults standardUserDefaults] secureObjectForKey:TAP_PREFS_CURRENT_VOICE_MESSAGE_PLAYING valid:nil];
return message;
}
+ (void)setActiveUser:(TAPUserModel *)user {
if (user != nil) {
NSDictionary *userDictionary = [user toDictionary];
......@@ -6793,6 +6781,14 @@
NSArray<NSString *> *unreadRoomIDs = [NSArray array];
unreadRoomIDs = [dataDictionary objectForKey:@"unreadRoomIDs"];
NSMutableArray<NSString *> *unreadRoomListIDs = [[TAPDataManager getUnreadRoomIDs] mutableCopy];
for (NSString *unreadID in unreadRoomIDs) {
if (![unreadRoomListIDs containsObject:unreadID]) {
[unreadRoomListIDs addObject:unreadID];
}
}
[TAPDataManager setUnreadRoomIDs:unreadRoomListIDs];
success(unreadRoomIDs);
} failure:^(NSURLSessionDataTask *dataTask, NSError *error) {
......@@ -6843,9 +6839,6 @@
return;
}
NSInteger errorCode = [[responseObject valueForKeyPath:@"error.code"] integerValue];
if (errorMessage == nil || [errorMessage isEqualToString:@""]) {
......@@ -6861,6 +6854,8 @@
NSArray<NSString *> *unreadRoomIDs = [dataDictionary objectForKey:@"unreadRoomIDs"];
[TAPDataManager setUnreadRoomIDs:unreadRoomIDs];
success(unreadRoomIDs);
} failure:^(NSURLSessionDataTask *dataTask, NSError *error) {
......
......@@ -18,7 +18,7 @@
//Prefs Key
#define TAP_PREFS_ACTIVE_USER @"Prefs.TapTalkActiveUser"
#define TAP_PREFS_UNREAD_ROOMIDS @"Prefs.TapTalkUnreadRoomIDs"
#define TAP_PREFS_CURRENT_VOICE_MESSAGE_PLAYING @"Prefs.TapTalkCurrentVoiceNotePlaying"
#define TAP_PREFS_CURRENT_VOICE_MESSAGE_PLAYING @"Prefs.TapTalkCurrentVoiceNoteMessagePlaying"
#define TAP_PREFS_PUSH_TOKEN @"Prefs.TapTalkPushToken"
#define TAP_PREFS_ACCESS_TOKEN @"Prefs.TapTalkAccessToken"
#define TAP_PREFS_REFRESH_TOKEN @"Prefs.TapTalkRefreshToken"
......
......@@ -1296,6 +1296,17 @@ CGPoint center;
[cell showStarMessageView];
}
if(message == self.currentVoiceNoteMessage){
[cell setPlayingState:YES];
NSTimeInterval currentTime = [[TAPAudioManager sharedManager] getPlayerCurrentTime];
[cell setAudioSliderMaximumValue:[[TAPAudioManager sharedManager] getPlayerDuration]];
[cell setAudioSliderValue:currentTime];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:currentTime]];
}
else{
[cell setPlayingState:NO];
}
if (!message.isHidden) {
if (![self.tappedMessageLocalID isEqualToString:@""] && [self.tappedMessageLocalID isEqualToString:message.localID]) {
[cell showBubbleHighlight];
......@@ -1852,6 +1863,17 @@ CGPoint center;
[cell showStarMessageView];
}
if(message == self.currentVoiceNoteMessage){
[cell setPlayingState:YES];
NSTimeInterval currentTime = [[TAPAudioManager sharedManager] getPlayerCurrentTime];
[cell setAudioSliderMaximumValue:[[TAPAudioManager sharedManager] getPlayerDuration]];
[cell setAudioSliderValue:currentTime];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:currentTime]];
}
else{
[cell setPlayingState:NO];
}
if (!message.isHidden) {
if (![self.tappedMessageLocalID isEqualToString:@""] && [self.tappedMessageLocalID isEqualToString:message.localID]) {
[cell showBubbleHighlight];
......@@ -2627,6 +2649,13 @@ CGPoint center;
if(self.currentVoiceNoteMessage != nil){
NSInteger messageIndex = [self.messageArray indexOfObject:self.currentVoiceNoteMessage];
NSDictionary *dataDictionary = self.currentVoiceNoteMessage.data;
dataDictionary = [TAPUtil nullToEmptyDictionary:dataDictionary];
NSNumber *vnDuration = [dataDictionary objectForKey:@"duration"];
NSInteger durationInt = [vnDuration integerValue];
durationInt /= 1000;
if(self.currentVoiceNoteMessage.type == TAPChatMessageTypeVoice){
if ([self.currentVoiceNoteMessage.user.userID isEqualToString:[TAPChatManager sharedManager].activeUser.userID]) {
//My Chat
......@@ -2634,6 +2663,7 @@ CGPoint center;
[cell setAudioSliderValue:0.0f];
[cell setPlayingState:NO];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:durationInt]];
}
else {
//Their Chat
......@@ -2641,8 +2671,10 @@ CGPoint center;
[cell setAudioSliderValue:0.0f];
[cell setPlayingState:NO];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:durationInt]];
}
}
self.currentVoiceNoteMessage = nil;
}
......@@ -5261,7 +5293,6 @@ CGPoint center;
[self resetMessageAudioSlider];
self.isMessageAudioPlaying = YES;
self.currentVoiceNoteMessage = tappedMessage;
[[TAPAudioManager sharedManager] playAudio:filePath];
}
 
......@@ -12346,12 +12377,18 @@ CGPoint center;
- (void)resetMessageAudioSlider{
if(self.currentVoiceNoteMessage != nil){
NSInteger messageIndex = [self.messageArray indexOfObject:self.currentVoiceNoteMessage];
NSDictionary *dataDictionary = self.currentVoiceNoteMessage.data;
dataDictionary = [TAPUtil nullToEmptyDictionary:dataDictionary];
NSNumber *vnDuration = [dataDictionary objectForKey:@"duration"];
NSInteger durationInt = [vnDuration integerValue];
durationInt /= 1000;
if(self.currentVoiceNoteMessage.type == TAPChatMessageTypeVoice){
if ([self.currentVoiceNoteMessage.user.userID isEqualToString:[TAPChatManager sharedManager].activeUser.userID]) {
//My Chat
TAPMyVoiceNoteBubbleTableViewCell *cell = (TAPMyVoiceNoteBubbleTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:messageIndex inSection:0]];
[cell setAudioSliderValue:0.0f];
[cell setPlayingState:NO];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:durationInt]];
}
else {
......@@ -12359,6 +12396,7 @@ CGPoint center;
TAPYourVoiceNoteBubbleTableViewCell *cell = (TAPYourVoiceNoteBubbleTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:messageIndex inSection:0]];
[cell setAudioSliderValue:0.0f];
[cell setPlayingState:NO];
[cell setVoiceNoteDurationLabel:[self secondToMinuteString:durationInt]];
}
}
......
......@@ -975,7 +975,6 @@
//Call API Get Unread Room List
[TAPDataManager callAPIGetMarkedAsUnreadChatRoomList:^(NSArray <NSString *> *roomIDs){
//handle pref
[TAPDataManager setUnreadRoomIDs:roomIDs];
[self handleRommlistAndUnreadSuccess:messageArray];
} failure:^(NSError *error) {
[self handleRommlistAndUnreadSuccess:messageArray];
......@@ -996,7 +995,6 @@
[TAPDataManager callAPIGetMarkedAsUnreadChatRoomList:^(NSArray<NSString *> *roomIDs){
//handle pref
[TAPDataManager setUnreadRoomIDs:roomIDs];
[self handleNewAndUpdatedSuccess:messageArray];
} failure:^(NSError *error) {
//handle pref
......@@ -1574,9 +1572,9 @@
- (void)callApiGetMarkedUnreadIDs{
[TAPDataManager callAPIGetMarkedAsUnreadChatRoomList:^(NSArray <NSString *> *roomIDs){
//handle pref
[TAPDataManager setUnreadRoomIDs:roomIDs];
} failure:^(NSError *error) {
// Saved to preference
}
failure:^(NSError *error) {
}];
}
......
......@@ -275,37 +275,10 @@
self.bubbleLabel.text = @"";
self.statusLabel.text = @"";
NSString *currentPlaingFilePath = [TAPDataManager getCurrentVoicePlayingFilePath];
currentPlaingFilePath = [TAPUtil nullToEmptyString:currentPlaingFilePath];
NSDictionary *dataDictionary = self.message.data;
dataDictionary = [TAPUtil nullToEmptyDictionary:dataDictionary];
NSString *fileURL = [dataDictionary objectForKey:@"url"];
if (fileURL == nil || [fileURL isEqualToString:@""]) {
fileURL = [dataDictionary objectForKey:@"fileURL"];
}
fileURL = [TAPUtil nullToEmptyString:fileURL];
if(![fileURL isEqualToString:@""]){
if(currentPlaingFilePath == fileURL){
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPauseMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.voiceNoteImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
else{
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.voiceNoteImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
}
else{
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.voiceNoteImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.voiceNoteImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
......
......@@ -258,38 +258,10 @@
[self showSenderInfo:NO];
NSString *currentPlaingFilePath = [TAPDataManager getCurrentVoicePlayingFilePath];
currentPlaingFilePath = [TAPUtil nullToEmptyString:currentPlaingFilePath];
NSDictionary *dataDictionary = self.message.data;
dataDictionary = [TAPUtil nullToEmptyDictionary:dataDictionary];
NSString *fileURL = [dataDictionary objectForKey:@"url"];
if (fileURL == nil || [fileURL isEqualToString:@""]) {
fileURL = [dataDictionary objectForKey:@"fileURL"];
}
fileURL = [TAPUtil nullToEmptyString:fileURL];
if(![fileURL isEqualToString:@""]){
if(currentPlaingFilePath == fileURL){
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPauseMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.fileImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
else{
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.fileImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
}
else{
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.fileImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
UIImage *documentsImage = [UIImage imageNamed:@"TAPIconPlayMessageBubble" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
documentsImage = [documentsImage setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconFileWhite]];
self.fileImageView.image = documentsImage;
self.doneDownloadImageView.image = documentsImage;
}
......
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