Clean up ahead of PR.

pull/2/head
Matthew Chen 6 years ago
parent 618a3b1d47
commit 922f787ff6

@ -7,9 +7,9 @@
<key>CarthageVersion</key>
<string>0.31.2</string>
<key>OSXVersion</key>
<string>10.14.3</string>
<string>10.14.2</string>
<key>WebRTCCommit</key>
<string>55de5593cc261fa9368c5ccde98884ed1e278ba0 M72</string>
<string>aa8bee9bd6f69e388a9ca7506b8702ef8ab7f195 M71</string>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>

@ -1234,50 +1234,6 @@ typedef enum : NSUInteger {
self.actionOnOpen = ConversationViewActionNone;
[self updateInputToolbarLayout];
[self showDebugImageEditorAsync];
}
- (void)showDebugImageEditorAsync
{
dispatch_async(dispatch_get_main_queue(), ^{
NSString *_Nullable filePath = [[NSBundle mainBundle] pathForResource:@"qr@2x" ofType:@"png" inDirectory:nil];
if (!filePath) {
OWSFailDebug(@"Missing asset.");
}
for (ConversationInteractionViewItem *viewItem in self.conversationViewModel.viewItems
.reverseObjectEnumerator) {
if (viewItem.mediaAlbumItems.count < 1) {
continue;
}
ConversationMediaAlbumItem *mediaItem = viewItem.mediaAlbumItems.firstObject;
if (mediaItem.attachmentStream == nil) {
continue;
}
if (!mediaItem.attachmentStream.isValidImage) {
continue;
}
filePath = mediaItem.attachmentStream.originalFilePath;
break;
}
DataSource *_Nullable dataSource =
[DataSourcePath dataSourceWithFilePath:filePath shouldDeleteOnDeallocation:NO];
if (!dataSource) {
OWSFailDebug(@"Invalid asset.");
return;
}
NSString *fileExtension = filePath.pathExtension;
NSString *dataUTI = [MIMETypeUtil utiTypeForFileExtension:fileExtension];
// "Document picker" attachments _SHOULD NOT_ be resized, if possible.
SignalAttachment *attachment =
[SignalAttachment attachmentWithDataSource:dataSource dataUTI:dataUTI imageQuality:TSImageQualityOriginal];
[self showApprovalDialogForAttachment:attachment];
});
}
// `viewWillDisappear` is called whenever the view *starts* to disappear,

@ -482,26 +482,8 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
[self.searchResultsController viewDidAppear:animated];
self.hasEverAppeared = YES;
[self presentFirstThreadAsync];
}
#ifdef DEBUG
- (void)presentFirstThreadAsync
{
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.tableView numberOfRowsInSection:HomeViewControllerSectionConversations] < 1) {
return;
}
TSThread *thread =
[self threadForIndexPath:[NSIndexPath indexPathForRow:0 inSection:HomeViewControllerSectionConversations]];
[self presentThread:thread action:ConversationViewActionNone animated:YES];
});
}
#endif
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];

Loading…
Cancel
Save