mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Missed call log - added Aborted and Early aborted conditions
This commit is contained in:
parent
3e428ac8cf
commit
95a939e73e
4 changed files with 10 additions and 4 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#import "HistoryDetailsTableView.h"
|
||||
#import "LinphoneManager.h"
|
||||
#import "Utils.h"
|
||||
#import "linphoneapp-Swift.h"
|
||||
|
||||
@implementation HistoryDetailsTableView
|
||||
|
||||
|
|
@ -89,7 +90,7 @@
|
|||
[LinphoneUtils durationToString:duration]]];
|
||||
BOOL outgoing = (linphone_call_log_get_dir(log) == LinphoneCallOutgoing);
|
||||
|
||||
if (linphone_call_log_get_status(log) == LinphoneCallMissed) {
|
||||
if ([SwiftUtil isCallLogMissedWithCLog:log]) {
|
||||
cell.imageView.image = [UIImage imageNamed:@"call_missed.png"];
|
||||
} else if (outgoing) {
|
||||
cell.imageView.image = [UIImage imageNamed:@"call_outgoing.png"];
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@
|
|||
self.sections = [NSMutableDictionary dictionary];
|
||||
while (logs != NULL) {
|
||||
LinphoneCallLog *log = (LinphoneCallLog *)logs->data;
|
||||
BOOL keepIt = (!missedFilter || linphone_call_log_get_status(log) == LinphoneCallMissed) && (!confFilter||linphone_call_log_was_conference(log)) ;
|
||||
BOOL keepIt = (!missedFilter || [SwiftUtil isCallLogMissedWithCLog:log]) && (!confFilter||linphone_call_log_was_conference(log)) ;
|
||||
if (keepIt) {
|
||||
NSDate *startDate = [self
|
||||
dateAtBeginningOfDayForDate:[NSDate
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
- (NSString *)accessibilityValue {
|
||||
BOOL incoming = linphone_call_log_get_dir(callLog) == LinphoneCallIncoming;
|
||||
BOOL missed = linphone_call_log_get_status(callLog) == LinphoneCallMissed;
|
||||
BOOL missed = [SwiftUtil isCallLogMissedWithCLog:callLog];
|
||||
NSString *call_type = incoming ? (missed ? @"Missed" : @"Incoming") : @"Outgoing";
|
||||
return [NSString stringWithFormat:@"%@ call from %@", call_type, displayNameLabel.text];
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
const LinphoneAddress *addr;
|
||||
UIImage *image;
|
||||
if (linphone_call_log_get_dir(callLog) == LinphoneCallIncoming) {
|
||||
if (linphone_call_log_get_status(callLog) != LinphoneCallMissed) {
|
||||
if (![SwiftUtil isCallLogMissedWithCLog:callLog]) {
|
||||
image = [UIImage imageNamed:@"call_status_incoming.png"];
|
||||
} else {
|
||||
image = [UIImage imageNamed:@"call_status_missed.png"];
|
||||
|
|
|
|||
|
|
@ -115,6 +115,11 @@ import linphonesw
|
|||
return (message.isOutgoing && [.Delivered, .DeliveredToUser, .Displayed].contains(message.state)) || (!message.isOutgoing && [.Displayed].contains(message.state))
|
||||
}
|
||||
|
||||
// Call Log
|
||||
@objc static func isCallLogMissed(cLog:OpaquePointer) -> Bool {
|
||||
let log = CallLog.getSwiftObject(cObject: cLog)
|
||||
return log.dir == .Incoming && [.Missed,.Aborted,.EarlyAborted].contains(log.status)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue