Merge branch 'charlesmchen/callStatusMessages'

pull/1/head
Matthew Chen 9 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 "OWSAttachmentsProcessor.h"
#import "Cryptography.h" #import "Cryptography.h"
#import "MIMETypeUtil.h" #import "MIMETypeUtil.h"
#import "OWSDispatch.h"
#import "OWSError.h" #import "OWSError.h"
#import "OWSSignalServiceProtos.pb.h" #import "OWSSignalServiceProtos.pb.h"
#import "TSAttachmentPointer.h" #import "TSAttachmentPointer.h"

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

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

@ -68,6 +68,10 @@ NSUInteger TSCallCurrentSchemaVersion = 1;
return NSLocalizedString(@"OUTGOING_CALL", @""); return NSLocalizedString(@"OUTGOING_CALL", @"");
case RPRecentCallTypeMissed: case RPRecentCallTypeMissed:
return NSLocalizedString(@"MISSED_CALL", @""); 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 #pragma mark - Logging
+ (NSString *)tag + (NSString *)tag

@ -14,7 +14,6 @@
#import "OWSDisappearingConfigurationUpdateInfoMessage.h" #import "OWSDisappearingConfigurationUpdateInfoMessage.h"
#import "OWSDisappearingMessagesConfiguration.h" #import "OWSDisappearingMessagesConfiguration.h"
#import "OWSDisappearingMessagesJob.h" #import "OWSDisappearingMessagesJob.h"
#import "OWSDispatch.h"
#import "OWSError.h" #import "OWSError.h"
#import "OWSIncomingSentMessageTranscript.h" #import "OWSIncomingSentMessageTranscript.h"
#import "OWSMessageSender.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 "OWSUploadingService.h"
#import "Cryptography.h" #import "Cryptography.h"
#import "MIMETypeUtil.h" #import "MIMETypeUtil.h"
#import "OWSDispatch.h"
#import "OWSError.h" #import "OWSError.h"
#import "TSAttachmentStream.h" #import "TSAttachmentStream.h"
#import "TSNetworkManager.h" #import "TSNetworkManager.h"

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

Loading…
Cancel
Save