From 28beda18f5adfc5e66f2ee04e0b22a3e0dd798d4 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 26 Oct 2015 09:40:40 +0100 Subject: [PATCH] Call: fix duration display --- Classes/CallView.m | 6 +----- Classes/LinphoneUI/Base.lproj/UIChatCell.xib | 22 ++++---------------- Classes/LinphoneUI/UICallConferenceCell.m | 3 +-- Classes/LinphoneUI/UICallPausedCell.m | 3 +-- Classes/LinphoneUI/UIChatCell.m | 3 +++ Classes/SideMenuView.xib | 11 +++++----- Classes/Utils/FastAddressBook.m | 1 + Classes/Utils/Utils.h | 4 ++++ Classes/Utils/Utils.m | 14 +++++++++++++ 9 files changed, 35 insertions(+), 32 deletions(-) diff --git a/Classes/CallView.m b/Classes/CallView.m index 3d52749d0..264eed55f 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -439,11 +439,7 @@ static void hideSpinner(LinphoneCall *call, void *user_data) { #pragma mark - UI modification - (void)callDurationUpdate { - LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]); - if (call) { - int duration = linphone_call_get_duration(call); - _durationLabel.text = [NSString stringWithFormat:@"%02i:%02i", (duration / 60), (duration % 60)]; - } + _durationLabel.text = [LinphoneUtils durationForCall:linphone_core_get_current_call([LinphoneManager getLc])]; } - (void)onCurrentCallChange { diff --git a/Classes/LinphoneUI/Base.lproj/UIChatCell.xib b/Classes/LinphoneUI/Base.lproj/UIChatCell.xib index 0cddd7ce6..767700fd6 100644 --- a/Classes/LinphoneUI/Base.lproj/UIChatCell.xib +++ b/Classes/LinphoneUI/Base.lproj/UIChatCell.xib @@ -1,5 +1,5 @@ - + @@ -31,26 +31,12 @@ -