Improve the call status messages in conversation view.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent bc1af80733
commit 90b85c0605

@ -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,20 @@ NSUInteger TSCallCurrentSchemaVersion = 1;
}];
}
#pragma mark - Methods
- (void)updateCallType:(RPRecentCallType)callType
{
_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

Loading…
Cancel
Save