Skip to content

Commit

Permalink
1.解决语音未读红色点的bug 2.解决Demo的添加信息的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xhzengAIB committed Dec 23, 2014
1 parent bfdddf2 commit 5abaef2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ - (XHMessage *)getVideoMessageWithBubbleMessageType:(XHBubbleMessageType)bubbleM
}

- (XHMessage *)getVoiceMessageWithBubbleMessageType:(XHBubbleMessageType)bubbleMessageType {
XHMessage *voiceMessage = [[XHMessage alloc] initWithVoicePath:nil voiceUrl:nil voiceDuration:@"1" sender:@"Jayson" timestamp:[NSDate date]];
XHMessage *voiceMessage = [[XHMessage alloc] initWithVoicePath:nil voiceUrl:nil voiceDuration:@"1" sender:@"Jayson" timestamp:[NSDate date] isRead:NO];
voiceMessage.avator = [UIImage imageNamed:@"avator"];
voiceMessage.avatorUrl = @"http://www.pailixiu.com/jack/JieIcon@2x.png";
voiceMessage.bubbleMessageType = bubbleMessageType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ - (void)addMessage:(XHMessage *)addedMessage {

[weakSelf exMainQueue:^{
weakSelf.messages = messages;
[weakSelf.messageTableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone];
[weakSelf.messageTableView reloadData];
[weakSelf scrollToBottomAnimated:YES];
}];
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,11 @@ - (void)configureBubbleImageView:(id <XHMessageModel>)message {
XHBubbleMessageMediaType currentType = message.messageMediaType;

_voiceDurationLabel.hidden = YES;
_voiceUnreadDotImageView.hidden = YES;
switch (currentType) {
case XHBubbleMessageMediaTypeVoice: {
_voiceDurationLabel.hidden = NO;
if (message.isRead == NO) {
_voiceUnreadDotImageView.hidden = NO;
}
_voiceUnreadDotImageView.hidden = message.isRead;
}
case XHBubbleMessageMediaTypeText:
case XHBubbleMessageMediaTypeEmotion: {
Expand Down

0 comments on commit 5abaef2

Please sign in to comment.