diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m
index e275a6beb..5503dbbcc 100644
--- a/Classes/HistoryListTableView.m
+++ b/Classes/HistoryListTableView.m
@@ -118,7 +118,17 @@
[self.sections setObject:eventsOnThisDay forKey:startDate];
}
- [eventsOnThisDay addObject:[NSValue valueWithPointer:log]];
+ // if this contact was already the previous entry, do not add it twice
+ LinphoneCallLog *prev = [eventsOnThisDay lastObject] ? [[eventsOnThisDay lastObject] pointerValue] : NULL;
+ if (prev && linphone_address_weak_equal(linphone_call_log_get_remote_address(prev),
+ linphone_call_log_get_remote_address(log))) {
+ long value = (long)linphone_call_log_get_user_data(prev);
+ value++;
+ linphone_call_log_set_user_data(prev, (void *)value);
+ } else {
+ linphone_call_log_set_user_data(log, (void *)1);
+ [eventsOnThisDay addObject:[NSValue valueWithPointer:log]];
+ }
}
logs = ms_list_next(logs);
}
diff --git a/Classes/LinphoneUI/Base.lproj/TabBarView.xib b/Classes/LinphoneUI/Base.lproj/TabBarView.xib
index db5a5ffd1..d9ab148f9 100644
--- a/Classes/LinphoneUI/Base.lproj/TabBarView.xib
+++ b/Classes/LinphoneUI/Base.lproj/TabBarView.xib
@@ -38,7 +38,6 @@
-
diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m
index 441429ef0..104e3957c 100644
--- a/Classes/LinphoneUI/UIHistoryCell.m
+++ b/Classes/LinphoneUI/UIHistoryCell.m
@@ -95,6 +95,13 @@
_stateImage.image = image;
[ContactDisplay setDisplayNameLabel:displayNameLabel forAddress:addr];
+
+ long count = (long)(linphone_call_log_get_user_data(callLog) ?: 0);
+ if (count > 1) {
+ displayNameLabel.text =
+ [displayNameLabel.text stringByAppendingString:[NSString stringWithFormat:@" (%ld)", count]];
+ }
+
[_avatarImage setImage:[FastAddressBook imageForAddress:addr thumbnail:YES] bordered:NO withRoundedRadius:YES];
}