From 2ff978fa008a7fd64022f05f835d6471547b1d27 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Thu, 20 Jun 2019 16:49:52 +0200 Subject: [PATCH] disable saveDataToUserDefaults as extensions is not activated --- Classes/ChatsListTableView.m | 3 +++ Classes/HistoryListTableView.m | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Classes/ChatsListTableView.m b/Classes/ChatsListTableView.m index 04a5f5aab..2d5ad4a1d 100644 --- a/Classes/ChatsListTableView.m +++ b/Classes/ChatsListTableView.m @@ -129,6 +129,8 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo } + (void) saveDataToUserDefaults { + // As extensions is disabled by default, this function takes too much CPU. +#if 0 NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.belledonne-communications.linphone.widget"]; MSList *sorted = nil; const MSList *unsorted = linphone_core_get_chat_rooms(LC); @@ -192,6 +194,7 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo } [defaults setObject:addresses forKey:@"chatrooms"]; +#endif } - (void)markCellAsRead:(LinphoneChatRoom *)chatRoom { diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m index b6e93aef7..658d70361 100644 --- a/Classes/HistoryListTableView.m +++ b/Classes/HistoryListTableView.m @@ -168,6 +168,8 @@ } + (void) saveDataToUserDefaults { + // As extensions is disabled by default, this function takes too much CPU. +#if 0 const bctbx_list_t *logs = linphone_core_get_call_logs(LC); NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.belledonne-communications.linphone.widget"]; NSMutableArray *logsShare = [NSMutableArray array]; @@ -223,6 +225,7 @@ } [mySharedDefaults setObject:logsShare forKey:@"logs"]; +#endif } - (void)computeSections {