Use destructiveButtonIndex value instead of hard-coded 0 index

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-12-01 16:05:11 +01:00
parent e8e06f8704
commit 202a22314c

View file

@ -292,7 +292,7 @@
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas{
LinphoneCall* call = (LinphoneCall*)datas;
if (buttonIndex == 0 ) {
if (buttonIndex == actionSheet.destructiveButtonIndex ) {
linphone_core_accept_call([LinphoneManager getLc],call);
} else {
linphone_core_terminate_call ([LinphoneManager getLc], call);