Clean up ahead of PR.

pull/2/head
Matthew Chen 6 years ago
parent 7c486d9093
commit dc4e174e86

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -135,7 +135,7 @@ public class ConversationMediaView: UIView {
} else if attachmentStream.isVideo {
configureForVideo(attachmentStream: attachmentStream)
} else {
owsFailDebug("Attachment has unexpected type.")
// owsFailDebug("Attachment has unexpected type.")
configure(forError: .invalid)
}
}

@ -1269,34 +1269,6 @@ typedef enum : NSUInteger {
self.actionOnOpen = ConversationViewActionNone;
[self updateInputToolbarLayout];
dispatch_async(dispatch_get_main_queue(), ^{
ConversationMediaAlbumItem *_Nullable firstMediaAlbumItem;
for (id<ConversationViewItem> item in self.viewItems) {
if (item.mediaAlbumItems.count < 1) {
continue;
}
ConversationMediaAlbumItem *mediaAlbumItem = item.mediaAlbumItems[0];
if (mediaAlbumItem.attachmentStream && mediaAlbumItem.attachmentStream.isImage) {
firstMediaAlbumItem = mediaAlbumItem;
break;
}
}
if (!firstMediaAlbumItem) {
return;
}
DataSource *_Nullable dataSource =
[DataSourcePath dataSourceWithURL:firstMediaAlbumItem.attachmentStream.originalMediaURL
shouldDeleteOnDeallocation:NO];
if (!dataSource) {
OWSFailDebug(@"attachment data was unexpectedly empty for picked document");
return;
}
NSString *utiType = [MIMETypeUtil utiTypeForMIMEType:firstMediaAlbumItem.attachmentStream.contentType];
SignalAttachment *attachment =
[SignalAttachment attachmentWithDataSource:dataSource dataUTI:utiType imageQuality:TSImageQualityOriginal];
[self showApprovalDialogForAttachment:attachment];
});
}
// `viewWillDisappear` is called whenever the view *starts* to disappear,

@ -672,12 +672,6 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
[self.searchResultsController viewDidAppear:animated];
self.hasEverAppeared = YES;
dispatch_async(dispatch_get_main_queue(), ^{
TSThread *thread =
[self threadForIndexPath:[NSIndexPath indexPathForRow:0 inSection:HomeViewControllerSectionConversations]];
[self presentThread:thread action:ConversationViewActionNone animated:YES];
});
}
- (void)viewDidDisappear:(BOOL)animated

@ -12,9 +12,9 @@ public extension NSObject {
button.setImage(imageName: imageName)
button.tintColor = .white
button.addTarget(self, action: selector, for: .touchUpInside)
// button.layer.shadowColor = UIColor.black.cgColor
// button.layer.shadowRadius = 4
// button.layer.shadowOpacity = 0.66
button.layer.shadowColor = UIColor.black.cgColor
button.layer.shadowRadius = 2
button.layer.shadowOpacity = 0.66
return button
}
}

Loading…
Cancel
Save