Merge branch 'charlesmchen/messageDetailsVsIPhoneX'
This commit is contained in:
commit
7013cf9b40
8
Signal.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Normal file
8
Signal.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -46,13 +46,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
|
||||
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
self.tableView.estimatedRowHeight = 70;
|
||||
|
||||
// Fix a bug that only affects iOS 11.0.x and 11.1.x.
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2)) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
[self.tableView applyScrollViewInsetsFix];
|
||||
|
||||
self.dbConnection = [[OWSPrimaryStorage sharedManager] newDatabaseConnection];
|
||||
[self.dbConnection beginLongLivedReadTransaction];
|
||||
|
||||
@ -521,13 +521,7 @@ typedef enum : NSUInteger {
|
||||
[self.collectionView autoPinWidthToSuperview];
|
||||
[self.collectionView autoPinToTopLayoutGuideOfViewController:self withInset:0];
|
||||
|
||||
// Fix a bug that only affects iOS 11.0.x and 11.1.x.
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2)) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
[self.collectionView applyScrollViewInsetsFix];
|
||||
|
||||
_inputToolbar = [ConversationInputToolbar new];
|
||||
self.inputToolbar.inputToolbarDelegate = self;
|
||||
|
||||
@ -216,7 +216,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
[scrollView contentInsetAdjustmentBehavior];
|
||||
} else {
|
||||
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
}
|
||||
|
||||
@ -146,7 +146,9 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
|
||||
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
|
||||
]
|
||||
} else {
|
||||
scrollView.autoPin(toBottomLayoutGuideOf: self, withInset: 0)
|
||||
scrollView.applyInsetsFix()
|
||||
|
||||
scrollView.autoPinEdge(toSuperviewEdge: .bottom)
|
||||
}
|
||||
|
||||
updateContent()
|
||||
|
||||
@ -452,13 +452,9 @@ NSString *const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
// Fix a bug that only affects iOS 11.0.x and 11.1.x.
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2)) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
[self.tableView applyScrollViewInsetsFix];
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.tableView autoPinWidthToSuperview];
|
||||
[self.tableView autoPinToTopLayoutGuideOfViewController:self withInset:0];
|
||||
|
||||
@ -125,6 +125,14 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value);
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@interface UIScrollView (OWS)
|
||||
|
||||
- (void)applyScrollViewInsetsFix;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Macros
|
||||
|
||||
CG_INLINE CGSize CGSizeCeil(CGSize size)
|
||||
|
||||
@ -487,4 +487,22 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation UIScrollView (OWS)
|
||||
|
||||
- (void)applyScrollViewInsetsFix
|
||||
{
|
||||
// Fix a bug that only affects iOS 11.0.x and 11.1.x.
|
||||
// The symptom is a fix weird animation that happens when using the interactive pop gesture.
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2)) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Loading…
Reference in New Issue
Block a user