remove unneccessary hack

Now that we have a nice system message design, we don't need to shoe
horn group updates into the TSCall adapter.

// FREEBIE
pull/1/head
Michael Kirk 8 years ago committed by Matthew Chen
parent dcf3de2ae2
commit 906b307e1f

@ -15,9 +15,9 @@ typedef enum : NSUInteger {
kCallMissed = 3,
kCallOutgoingIncomplete = 4,
kCallIncomingIncomplete = 5,
// kGroupUpdateJoin has been deprecated.
kGroupUpdateLeft = 7,
kGroupUpdate = 8,
// kGroupUpdateJoin = 6, has been deprecated.
// kGroupUpdateLeft = 7, has been deprecated.
// kGroupUpdate = 8, has been deprecated.
kCallMissedBecauseOfChangedIdentity = 9,
} CallStatus;
@ -26,14 +26,6 @@ typedef enum : NSUInteger {
#pragma mark - Initialization
- (instancetype)initWithCallRecord:(TSCall *)callRecord;
- (instancetype)initWithInteraction:(TSInteraction *)interaction
callerId:(NSString *)senderId
callerDisplayName:(NSString *)senderDisplayName
date:(nullable NSDate *)date
status:(CallStatus)status
displayString:(NSString *)detailString NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/*

@ -224,28 +224,6 @@ NS_ASSUME_NONNULL_BEGIN
adapter.infoMessageType = infoMessage.messageType;
adapter.messageBody = infoMessage.description;
adapter.messageType = TSInfoMessageAdapter;
if (adapter.infoMessageType == TSInfoMessageTypeGroupQuit ||
adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) {
// repurposing call display for info message stuff for group updates, ! adapter will know because the date
// is nil.
//
// TODO: I suspect that we'll want a separate model
// that conforms to <OWSMessageData> for info
// messages.
CallStatus status = 0;
if (adapter.infoMessageType == TSInfoMessageTypeGroupQuit) {
status = kGroupUpdateLeft;
} else if (adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) {
status = kGroupUpdate;
}
OWSCall *call = [[OWSCall alloc] initWithInteraction:interaction
callerId:@""
callerDisplayName:adapter.messageBody
date:nil
status:status
displayString:@""];
return call;
}
} else if ([interaction isKindOfClass:[TSUnreadIndicatorInteraction class]]) {
adapter.messageType = TSUnreadIndicatorAdapter;
} else if ([interaction isKindOfClass:[TSErrorMessage class]]) {

Loading…
Cancel
Save