quoted reply: distinguish "not found" vs. "no longer available"

pull/1/head
Michael Kirk 7 years ago
parent fb9958b1da
commit 75ead2ac09

@ -2370,6 +2370,11 @@ typedef enum : NSUInteger {
__block NSUInteger threadInteractionCount = 0;
__block NSNumber *_Nullable groupIndex = nil;
if (quotedReply.isRemotelySourced) {
[self presentRemotelySourcedQuotedReplyToast];
return;
}
[self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
quotedInteraction = [ThreadUtil findInteractionInThreadByTimestamp:quotedReply.timestamp
authorId:quotedReply.authorId
@ -5317,9 +5322,24 @@ typedef enum : NSUInteger {
{
DDLogInfo(@"%@ in %s", self.logTag, __PRETTY_FUNCTION__);
NSString *toastText = NSLocalizedString(@"QUOTED_REPLY_MISSING_ORIGINAL_MESSAGE",
@"Toast alert text shown when tapping on a quoted message which we cannot scroll to, because the local copy of "
@"the message doesn't exist.");
NSString *toastText = NSLocalizedString(@"QUOTED_REPLY_ORIGINAL_MESSAGE_DELETED",
@"Toast alert text shown when tapping on a quoted message which we cannot scroll to because the local copy of "
@"the message was since deleted.");
ToastController *toastController = [[ToastController alloc] initWithText:toastText];
CGFloat bottomInset = 10 + self.collectionView.contentInset.bottom + self.view.layoutMargins.bottom;
[toastController presentToastViewFromBottomOfView:self.view inset:bottomInset];
}
- (void)presentRemotelySourcedQuotedReplyToast
{
DDLogInfo(@"%@ in %s", self.logTag, __PRETTY_FUNCTION__);
NSString *toastText = NSLocalizedString(@"QUOTED_REPLY_ORIGINAL_MESSAGE_REMOTELY_SOURCED",
@"Toast alert text shown when tapping on a quoted message which we cannot scroll to because the local copy of "
@"the message didn't exist when the quote was received.");
ToastController *toastController = [[ToastController alloc] initWithText:toastText];

@ -1263,12 +1263,6 @@
/* Indicates that this 1:1 conversation is no longer verified. Embeds {{user's name or phone number}}. */
"MESSAGES_VIEW_CONTACT_NO_LONGER_VERIFIED_FORMAT" = "%@ is no longer marked as verified. Tap for options.";
/* Action sheet title after tapping on failed download. */
"MESSAGES_VIEW_FAILED_DOWNLOAD_ACTIONSHEET_TITLE" = "Download Failed.";
/* Action sheet button text */
"MESSAGES_VIEW_FAILED_DOWNLOAD_RETRY_ACTION" = "Download Again";
/* Indicates that a single member of this group has been blocked. */
"MESSAGES_VIEW_GROUP_1_MEMBER_BLOCKED" = "You Blocked 1 Member of this Group";
@ -1610,8 +1604,11 @@
/* Footer label that appears below quoted messages when the quoted content was note derived locally. When the local user doesn't have a copy of the message being quoted, e.g. if it had since been deleted, we instead show the content specified by the sender. */
"QUOTED_REPLY_CONTENT_FROM_REMOTE_SOURCE" = "Original message not found.";
/* Toast alert text shown when tapping on a quoted message which we cannot scroll to, because the local copy of the message doesn't exist. */
"QUOTED_REPLY_MISSING_ORIGINAL_MESSAGE" = "Original message not found.";
/* Toast alert text shown when tapping on a quoted message which we cannot scroll to because the local copy of the message was since deleted. */
"QUOTED_REPLY_ORIGINAL_MESSAGE_DELETED" = "Original message no longer available.";
/* Toast alert text shown when tapping on a quoted message which we cannot scroll to because the local copy of the message didn't exist when the quote was received. */
"QUOTED_REPLY_ORIGINAL_MESSAGE_REMOTELY_SOURCED" = "Original message not found.";
/* Indicates this message is a quoted reply to an attachment of unknown type. */
"QUOTED_REPLY_TYPE_ATTACHMENT" = "Attachment";

Loading…
Cancel
Save