Merge branch 'charlesmchen/callStatusMessages'

pull/1/head
Matthew Chen 8 years ago
commit 0252797734

@ -1,9 +1,10 @@
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSAttachmentsProcessor.h"
#import "Cryptography.h"
#import "MIMETypeUtil.h"
#import "OWSDispatch.h"
#import "OWSError.h"
#import "OWSSignalServiceProtos.pb.h"
#import "TSAttachmentPointer.h"

@ -6,7 +6,6 @@
#import "ContactsUpdater.h"
#import "NSData+messagePadding.h"
#import "OWSDisappearingMessagesJob.h"
#import "OWSDispatch.h"
#import "OWSError.h"
#import "OWSLegacyMessageServiceParams.h"
#import "OWSMessageServiceParams.h"

@ -13,6 +13,9 @@ typedef enum {
RPRecentCallTypeIncoming = 1,
RPRecentCallTypeOutgoing,
RPRecentCallTypeMissed,
// These call types are used until the call connects.
RPRecentCallTypeOutgoingIncomplete,
RPRecentCallTypeIncomingIncomplete,
} RPRecentCallType;
@interface TSCall : TSInteraction <OWSReadTracking>
@ -26,6 +29,8 @@ typedef enum {
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (void)updateCallType:(RPRecentCallType)callType;
@end
NS_ASSUME_NONNULL_END

@ -68,6 +68,10 @@ NSUInteger TSCallCurrentSchemaVersion = 1;
return NSLocalizedString(@"OUTGOING_CALL", @"");
case RPRecentCallTypeMissed:
return NSLocalizedString(@"MISSED_CALL", @"");
case RPRecentCallTypeOutgoingIncomplete:
return NSLocalizedString(@"OUTGOING_INCOMPLETE_CALL", @"");
case RPRecentCallTypeIncomingIncomplete:
return NSLocalizedString(@"INCOMING_INCOMPLETE_CALL", @"");
}
}
@ -91,6 +95,26 @@ NSUInteger TSCallCurrentSchemaVersion = 1;
}];
}
#pragma mark - Methods
- (void)updateCallType:(RPRecentCallType)callType
{
DDLogInfo(@"%@ updating call type of call: %d with uniqueId: %@ which has timestamp: %llu",
self.tag,
(int)self.callType,
self.uniqueId,
self.timestamp);
_callType = callType;
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[self saveWithTransaction:transaction];
// redraw any thread-related unread count UI.
[self touchThreadWithTransaction:transaction];
}];
}
#pragma mark - Logging
+ (NSString *)tag

@ -14,7 +14,6 @@
#import "OWSDisappearingConfigurationUpdateInfoMessage.h"
#import "OWSDisappearingMessagesConfiguration.h"
#import "OWSDisappearingMessagesJob.h"
#import "OWSDispatch.h"
#import "OWSError.h"
#import "OWSIncomingSentMessageTranscript.h"
#import "OWSMessageSender.h"

@ -1,10 +1,10 @@
// Created by Michael Kirk on 10/18/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSUploadingService.h"
#import "Cryptography.h"
#import "MIMETypeUtil.h"
#import "OWSDispatch.h"
#import "OWSError.h"
#import "TSAttachmentStream.h"
#import "TSNetworkManager.h"

@ -5,7 +5,6 @@
#import "SubProtocol.pb.h"
#import "Cryptography.h"
#import "OWSDispatch.h"
#import "OWSSignalService.h"
#import "OWSWebsocketSecurityPolicy.h"
#import "TSAccountManager.h"

Loading…
Cancel
Save