History: set history_max_size to -1 so that there is no limitation since we are using database now

This commit is contained in:
Gautier Pelloux-Prayer 2015-11-23 17:05:34 +01:00
parent 647fb4a53d
commit 9d93265706
6 changed files with 16 additions and 11 deletions

View file

@ -244,7 +244,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[controller setToRecipients:recipients];
if (attachLogs) {
char *filepath = linphone_core_compress_log_collection([LinphoneManager getLc]);
char *filepath = linphone_core_compress_log_collection();
if (filepath == NULL) {
LOGE(@"Cannot sent logs: file is NULL");
return;

View file

@ -27,6 +27,6 @@
@property(nonatomic, assign) BOOL missedFilter;
@property(strong, nonatomic) NSMutableDictionary *sections;
@property(strong, nonatomic) NSArray *sortedDays;
@property(strong, nonatomic) NSMutableArray *sortedDays;
@end

View file

@ -97,7 +97,8 @@
NSTimeZone *timeZone = [NSTimeZone systemTimeZone];
[calendar setTimeZone:timeZone];
NSDateComponents *dateComps =
[calendar components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:inputDate];
[calendar components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:inputDate];
dateComps.hour = dateComps.minute = dateComps.second = 0;
return [calendar dateFromComponents:dateComps];
}
@ -129,9 +130,10 @@
- (void)computeSections {
NSArray *unsortedDays = [self.sections allKeys];
_sortedDays = [unsortedDays sortedArrayUsingComparator:^NSComparisonResult(NSDate *d1, NSDate *d2) {
return [d2 compare:d1]; // reverse order
}];
_sortedDays = [[NSMutableArray alloc]
initWithArray:[unsortedDays sortedArrayUsingComparator:^NSComparisonResult(NSDate *d1, NSDate *d2) {
return [d2 compare:d1]; // reverse order
}]];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
@ -211,9 +213,9 @@
[[_sections objectForKey:_sortedDays[indexPath.section]] removeObject:log];
if (((NSArray *)[_sections objectForKey:_sortedDays[indexPath.section]]).count == 0) {
[_sections removeObjectForKey:_sortedDays[indexPath.section]];
[_sortedDays removeObjectAtIndex:indexPath.section];
[tableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section]
withRowAnimation:UITableViewRowAnimationFade];
[self computeSections];
}
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]

View file

@ -759,11 +759,10 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - Mail composer for sending logs
- (void)sendEmailWithDebugAttachments {
LinphoneCore *lc = [LinphoneManager getLc];
NSMutableArray *attachments = [[NSMutableArray alloc] initWithCapacity:3];
// retrieve linphone logs if available
char *filepath = linphone_core_compress_log_collection(lc);
char *filepath = linphone_core_compress_log_collection();
if (filepath != NULL) {
NSString *filename = [[NSString stringWithUTF8String:filepath] componentsSeparatedByString:@"/"].lastObject;
NSString *mimeType = nil;

View file

@ -22,4 +22,8 @@ send_logs_include_linphonerc_and_chathistory=0
username_regex=^[a-z0-9_.\-]*$
[in_app_purchase]
enabled=0
enabled=0
[misc]
#by default it is set to 30 by liblinphone
history_max_size=-1

@ -1 +1 @@
Subproject commit 5d44564e109c4780460ce83463d1ef6bf94712d2
Subproject commit c4d781f152cb67f905610511a2a31b0427eaf8a7