do not update application badge number when not necessary

This commit is contained in:
Benjamin Reis 2018-03-12 14:16:51 +01:00
parent 392f991fae
commit c1becd41e5

View file

@ -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 -