diff --git a/Classes/DialerView.m b/Classes/DialerView.m index 3cb103d6a..708cc7d95 100644 --- a/Classes/DialerView.m +++ b/Classes/DialerView.m @@ -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; diff --git a/Classes/HistoryListTableView.h b/Classes/HistoryListTableView.h index bc06538ec..d9e7fa40c 100644 --- a/Classes/HistoryListTableView.h +++ b/Classes/HistoryListTableView.h @@ -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 diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m index 86140a17f..e275a6beb 100644 --- a/Classes/HistoryListTableView.m +++ b/Classes/HistoryListTableView.m @@ -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] diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m index 50f79a070..29b390db8 100644 --- a/Classes/SettingsView.m +++ b/Classes/SettingsView.m @@ -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; diff --git a/Resources/linphonerc-factory b/Resources/linphonerc-factory index 60a6a5bc8..b59c2071e 100644 --- a/Resources/linphonerc-factory +++ b/Resources/linphonerc-factory @@ -22,4 +22,8 @@ send_logs_include_linphonerc_and_chathistory=0 username_regex=^[a-z0-9_.\-]*$ [in_app_purchase] -enabled=0 \ No newline at end of file +enabled=0 + +[misc] +#by default it is set to 30 by liblinphone +history_max_size=-1 \ No newline at end of file diff --git a/submodules/linphone b/submodules/linphone index 5d44564e1..c4d781f15 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 5d44564e109c4780460ce83463d1ef6bf94712d2 +Subproject commit c4d781f152cb67f905610511a2a31b0427eaf8a7