From c1becd41e57ff235b25535d2cf50391b4518121b Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 12 Mar 2018 14:16:51 +0100 Subject: [PATCH] do not update application badge number when not necessary --- Classes/PhoneMainView.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 3c7b1a0c3..1d35bcd33 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -461,7 +461,7 @@ static RootViewManager *rootViewManagerInstance = nil; objectForKey:[NSString stringWithUTF8String:linphone_call_log_get_call_id( linphone_call_get_call_log(call))]]; if (!uuid) { - return; + break; } CXSetHeldCallAction *act = [[CXSetHeldCallAction alloc] initWithCallUUID:uuid onHold:NO]; CXTransaction *tr = [[CXTransaction alloc] initWithAction:act]; @@ -474,7 +474,8 @@ static RootViewManager *rootViewManagerInstance = nil; case LinphoneCallUpdating: break; } - [self updateApplicationBadgeNumber]; + if (state == LinphoneCallEnd || state == LinphoneCallError || floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) + [self updateApplicationBadgeNumber]; } #pragma mark -