Merge branch 'charlesmchen/incomingAndOutgoingDatabaseViews'

pull/1/head
Matthew Chen 7 years ago
commit d1212deab5

@ -136,7 +136,7 @@ CHECKOUT OPTIONS:
:commit: 7054e4b13ee5bcd6d524adb6dc9a726e8c466308 :commit: 7054e4b13ee5bcd6d524adb6dc9a726e8c466308
:git: https://github.com/WhisperSystems/JSQMessagesViewController.git :git: https://github.com/WhisperSystems/JSQMessagesViewController.git
SignalServiceKit: SignalServiceKit:
:commit: 888943a047ef818e0af2457b893662c8cae7406a :commit: 07b54039b231ae08a505cae2a14f65f7bb570f84
:git: https://github.com/WhisperSystems/SignalServiceKit.git :git: https://github.com/WhisperSystems/SignalServiceKit.git
SocketRocket: SocketRocket:
:commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf

@ -8,12 +8,13 @@
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : 0, "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : 0,
"01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : 0, "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : 0,
"ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : 0, "ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : 0,
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : 0,
"90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : 0, "90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : 0,
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : 0,
"D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : 0, "D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : 0,
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : 0, "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : 0,
"8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : 9223372036854775807, "8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : 9223372036854775807,
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : 0, "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : 0,
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703" : 9223372036854775807,
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : 0, "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : 0,
"8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : 9223372036854775807 "8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : 9223372036854775807
}, },
@ -23,12 +24,13 @@
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : "Signal-iOS-2\/", "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : "Signal-iOS-2\/",
"01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : "SignalProtocolKit\/", "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : "SignalProtocolKit\/",
"ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : "SocketRocket\/", "ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : "SocketRocket\/",
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : "Signal-iOS\/",
"90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : "JSQMessagesViewController\/", "90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : "JSQMessagesViewController\/",
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : "Signal-iOS\/",
"D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : "Signal-iOS\/Pods\/", "D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : "Signal-iOS\/Pods\/",
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : "SignalServiceKit\/", "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : "SignalServiceKit\/",
"8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : "Signal-iOS\/Carthage\/", "8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : "Signal-iOS\/Carthage\/",
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : "Signal-iOS-5\/", "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : "Signal-iOS-5\/",
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703" : "SignalServiceKit-2\/",
"37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : "SignalServiceKit\/", "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : "SignalServiceKit\/",
"8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : "Signal-iOS-5\/Carthage\/" "8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : "Signal-iOS-5\/Carthage\/"
}, },
@ -41,6 +43,11 @@
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC"
}, },
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalServiceKit.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703"
},
{ {
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalProtocolKit.git", "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalProtocolKit.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",

@ -690,8 +690,6 @@ typedef enum : NSUInteger {
@property (nonatomic, readonly) UILabel *backButtonUnreadCountLabel; @property (nonatomic, readonly) UILabel *backButtonUnreadCountLabel;
@property (nonatomic, readonly) NSUInteger backButtonUnreadCount; @property (nonatomic, readonly) NSUInteger backButtonUnreadCount;
@property (nonatomic) CGFloat previousCollectionViewFrameWidth;
@property (nonatomic) NSUInteger page; @property (nonatomic) NSUInteger page;
@property (nonatomic) BOOL composeOnOpen; @property (nonatomic) BOOL composeOnOpen;
@property (nonatomic) BOOL callOnOpen; @property (nonatomic) BOOL callOnOpen;

@ -166,37 +166,12 @@ NS_ASSUME_NONNULL_BEGIN
} }
} }
__block TSIncomingMessage *firstIncomingMessage = nil; TSIncomingMessage *firstIncomingMessage =
__block TSOutgoingMessage *firstOutgoingMessage = nil; [[transaction ext:TSThreadIncomingMessageDatabaseViewExtensionName] firstObjectInGroup:thread.uniqueId];
__block long outgoingMessageCount = 0; TSOutgoingMessage *firstOutgoingMessage =
[[transaction ext:TSMessageDatabaseViewExtensionName] [[transaction ext:TSThreadOutgoingMessageDatabaseViewExtensionName] firstObjectInGroup:thread.uniqueId];
enumerateRowsInGroup:thread.uniqueId NSUInteger outgoingMessageCount =
usingBlock:^( [[transaction ext:TSThreadOutgoingMessageDatabaseViewExtensionName] numberOfItemsInGroup:thread.uniqueId];
NSString *collection, NSString *key, id object, id metadata, NSUInteger index, BOOL *stop) {
if ([object isKindOfClass:[TSIncomingMessage class]]) {
TSIncomingMessage *incomingMessage = (TSIncomingMessage *)object;
if (!firstIncomingMessage) {
firstIncomingMessage = incomingMessage;
} else {
OWSAssert(
[firstIncomingMessage compareForSorting:incomingMessage] == NSOrderedAscending);
}
} else if ([object isKindOfClass:[TSOutgoingMessage class]]) {
TSOutgoingMessage *outgoingMessage = (TSOutgoingMessage *)object;
if (!firstOutgoingMessage) {
firstOutgoingMessage = outgoingMessage;
} else {
OWSAssert(
[firstOutgoingMessage compareForSorting:outgoingMessage] == NSOrderedAscending);
}
outgoingMessageCount++;
if (outgoingMessageCount >= kMaxBlockOfferOutgoingMessageCount) {
*stop = YES;
}
}
}];
// Enumerate in reverse to count the number of messages // Enumerate in reverse to count the number of messages
// after the unseen messages indicator. Not all of // after the unseen messages indicator. Not all of

Loading…
Cancel
Save