forked from mirrors/linphone-iphone
fix chat size
This commit is contained in:
parent
ddb81ab171
commit
ebe3c0133b
2 changed files with 1 additions and 11 deletions
|
|
@ -191,7 +191,7 @@
|
|||
}
|
||||
|
||||
static const int MAX_AGGLOMERATED_TIME=300;
|
||||
static const int BASIC_EVENT_LIST=20;
|
||||
static const int BASIC_EVENT_LIST=15;
|
||||
|
||||
- (BOOL)isFirstIndexInTableView:(NSIndexPath *)indexPath chat:(LinphoneChatMessage *)chat {
|
||||
LinphoneEventLog *previousEvent = nil;
|
||||
|
|
|
|||
|
|
@ -420,13 +420,6 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
|
|||
}
|
||||
|
||||
+ (CGSize)ViewHeightForMessageText:(LinphoneChatMessage *)chat withWidth:(int)width textForImdn:(NSString *)imdnText{
|
||||
|
||||
// Avoid calculating the size each time, it takes too much time. Update the size of the chat cell once the version of the application has been modified.
|
||||
NSString *chatSize = [LinphoneManager getMessageAppDataForKey:@"newChatSize" inMessage:chat];
|
||||
NSString *version = [NSString stringWithFormat:@"%@-%@",[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"],[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
|
||||
if (chatSize && !imdnText && [version isEqualToString:[LinphoneManager getMessageAppDataForKey:@"appVersion" inMessage:chat]])
|
||||
return CGSizeFromString(chatSize);
|
||||
|
||||
NSString *messageText = [UIChatBubbleTextCell TextMessageForChat:chat];
|
||||
static UIFont *messageFont = nil;
|
||||
|
||||
|
|
@ -510,9 +503,6 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
|
|||
|
||||
size.width = MAX(size.width + CELL_MESSAGE_X_MARGIN, CELL_MIN_WIDTH);
|
||||
size.height = MAX(size.height + CELL_MESSAGE_Y_MARGIN, CELL_MIN_HEIGHT);
|
||||
|
||||
[LinphoneManager setValueInMessageAppData:NSStringFromCGSize(size) forKey:@"newChatSize" inMessage:chat];
|
||||
[LinphoneManager setValueInMessageAppData:version forKey:@"appVersion" inMessage:chat];
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue