Resolve some leftover TODOs
This commit is contained in:
parent
71df0b84f0
commit
ccc36c021b
|
@ -1451,20 +1451,7 @@ typedef enum : NSUInteger {
|
||||||
|
|
||||||
- (void)handleFailedDownloadTapForMessage:(TSMessage *)message
|
- (void)handleFailedDownloadTapForMessage:(TSMessage *)message
|
||||||
{
|
{
|
||||||
OWSAssert(message);
|
// Do nothing
|
||||||
|
|
||||||
// TODO TODO TODO
|
|
||||||
|
|
||||||
// [self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
|
|
||||||
// [self.attachmentDownloads downloadAttachmentsForMessage:message
|
|
||||||
// transaction:transaction
|
|
||||||
// success:^(NSArray<TSAttachmentStream *> *attachmentStreams) {
|
|
||||||
// OWSLogInfo(@"Successfully redownloaded attachment in thread: %@", message.thread);
|
|
||||||
// }
|
|
||||||
// failure:^(NSError *error) {
|
|
||||||
// OWSLogWarn(@"Failed to redownload message with error: %@", error);
|
|
||||||
// }];
|
|
||||||
// }];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)handleUnsentMessageTap:(TSOutgoingMessage *)message
|
- (void)handleUnsentMessageTap:(TSOutgoingMessage *)message
|
||||||
|
@ -1482,6 +1469,8 @@ typedef enum : NSUInteger {
|
||||||
}];
|
}];
|
||||||
[actionSheet addAction:deleteMessageAction];
|
[actionSheet addAction:deleteMessageAction];
|
||||||
|
|
||||||
|
// TODO TODO TODO
|
||||||
|
|
||||||
// UIAlertAction *resendMessageAction = [UIAlertAction
|
// UIAlertAction *resendMessageAction = [UIAlertAction
|
||||||
// actionWithTitle:NSLocalizedString(@"SEND_AGAIN_BUTTON", @"")
|
// actionWithTitle:NSLocalizedString(@"SEND_AGAIN_BUTTON", @"")
|
||||||
// accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME(self, @"send_again")
|
// accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME(self, @"send_again")
|
||||||
|
@ -1908,35 +1897,7 @@ typedef enum : NSUInteger {
|
||||||
quotedReply:(OWSQuotedReplyModel *)quotedReply
|
quotedReply:(OWSQuotedReplyModel *)quotedReply
|
||||||
failedThumbnailDownloadAttachmentPointer:(TSAttachmentPointer *)attachmentPointer
|
failedThumbnailDownloadAttachmentPointer:(TSAttachmentPointer *)attachmentPointer
|
||||||
{
|
{
|
||||||
OWSAssertIsOnMainThread();
|
// Do nothing
|
||||||
OWSAssertDebug(viewItem);
|
|
||||||
OWSAssertDebug(attachmentPointer);
|
|
||||||
|
|
||||||
TSMessage *message = (TSMessage *)viewItem.interaction;
|
|
||||||
if (![message isKindOfClass:[TSMessage class]]) {
|
|
||||||
OWSFailDebug(@"message had unexpected class: %@", message.class);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO TODO TODO
|
|
||||||
|
|
||||||
// [self.uiDatabaseConnection asyncReadWithBlock:^(YapDatabaseReadTransaction *transaction) {
|
|
||||||
// [self.attachmentDownloads downloadAttachmentPointer:attachmentPointer
|
|
||||||
// success:^(NSArray<TSAttachmentStream *> *attachmentStreams) {
|
|
||||||
// OWSAssertDebug(attachmentStreams.count == 1);
|
|
||||||
// TSAttachmentStream *attachmentStream = attachmentStreams.firstObject;
|
|
||||||
// [LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *postSuccessTransaction) {
|
|
||||||
// [message setQuotedMessageThumbnailAttachmentStream:attachmentStream];
|
|
||||||
// [message saveWithTransaction:postSuccessTransaction];
|
|
||||||
// }];
|
|
||||||
// }
|
|
||||||
// failure:^(NSError *error) {
|
|
||||||
// OWSLogWarn(@"Failed to redownload thumbnail with error: %@", error);
|
|
||||||
// [LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *postSuccessTransaction) {
|
|
||||||
// [message touchWithTransaction:postSuccessTransaction];
|
|
||||||
// }];
|
|
||||||
// }];
|
|
||||||
// }];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)didTapConversationItem:(id<ConversationViewItem>)viewItem quotedReply:(OWSQuotedReplyModel *)quotedReply
|
- (void)didTapConversationItem:(id<ConversationViewItem>)viewItem quotedReply:(OWSQuotedReplyModel *)quotedReply
|
||||||
|
|
|
@ -148,7 +148,6 @@ typedef NS_ENUM(NSUInteger, OWSRegistrationState) {
|
||||||
// Re-registration is the process of re-registering _with the same phone number_.
|
// Re-registration is the process of re-registering _with the same phone number_.
|
||||||
|
|
||||||
// Returns YES on success.
|
// Returns YES on success.
|
||||||
- (BOOL)resetForReregistration;
|
|
||||||
- (nullable NSString *)reregisterationPhoneNumber;
|
- (nullable NSString *)reregisterationPhoneNumber;
|
||||||
- (BOOL)isReregistering;
|
- (BOOL)isReregistering;
|
||||||
|
|
||||||
|
|
|
@ -404,37 +404,6 @@ NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountMa
|
||||||
[self postRegistrationStateDidChangeNotification];
|
[self postRegistrationStateDidChangeNotification];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Re-registration
|
|
||||||
|
|
||||||
- (BOOL)resetForReregistration
|
|
||||||
{
|
|
||||||
@synchronized(self) {
|
|
||||||
NSString *_Nullable localNumber = self.localNumber;
|
|
||||||
if (!localNumber) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
_isRegistered = NO;
|
|
||||||
_cachedLocalNumber = nil;
|
|
||||||
_phoneNumberAwaitingVerification = nil;
|
|
||||||
_cachedIsDeregistered = nil;
|
|
||||||
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
|
||||||
[transaction removeAllObjectsInCollection:TSAccountManager_UserAccountCollection];
|
|
||||||
|
|
||||||
// TODO TODO TODO
|
|
||||||
// [[OWSPrimaryStorage sharedManager] resetSessionStore:transaction];
|
|
||||||
|
|
||||||
[transaction setObject:localNumber
|
|
||||||
forKey:TSAccountManager_ReregisteringPhoneNumberKey
|
|
||||||
inCollection:TSAccountManager_UserAccountCollection];
|
|
||||||
}];
|
|
||||||
|
|
||||||
[self postRegistrationStateDidChangeNotification];
|
|
||||||
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (nullable NSString *)reregisterationPhoneNumber
|
- (nullable NSString *)reregisterationPhoneNumber
|
||||||
{
|
{
|
||||||
NSString *_Nullable result = [self.dbConnection stringForKey:TSAccountManager_ReregisteringPhoneNumberKey
|
NSString *_Nullable result = [self.dbConnection stringForKey:TSAccountManager_ReregisteringPhoneNumberKey
|
||||||
|
|
Loading…
Reference in New Issue