From 50b6862815e7f6584a36a7889bbef817e0eedb19 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Thu, 25 Feb 2021 13:27:20 +1100 Subject: [PATCH] Fix color and incorrect offset --- Session/Media Viewing & Editing/ImagePickerController.swift | 6 +++--- .../AttachmentApprovalInputAccessoryView.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Session/Media Viewing & Editing/ImagePickerController.swift b/Session/Media Viewing & Editing/ImagePickerController.swift index 528426807..36f514d2a 100644 --- a/Session/Media Viewing & Editing/ImagePickerController.swift +++ b/Session/Media Viewing & Editing/ImagePickerController.swift @@ -57,7 +57,7 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat collectionView.register(PhotoGridViewCell.self, forCellWithReuseIdentifier: PhotoGridViewCell.reuseIdentifier) // ensure images at the end of the list can be scrolled above the bottom buttons - let bottomButtonInset = -1 * SendMediaNavigationController.bottomButtonsCenterOffset + SendMediaNavigationController.bottomButtonWidth / 2 + let bottomButtonInset = -1 * SendMediaNavigationController.bottomButtonsCenterOffset + SendMediaNavigationController.bottomButtonWidth / 2 + 16 collectionView.contentInset.bottom = bottomButtonInset + 16 view.backgroundColor = .white @@ -253,9 +253,9 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat } // MARK: - + var lastPageYOffset: CGFloat { - var yOffset = collectionView.contentSize.height - collectionView.frame.height + collectionView.contentInset.bottom + var yOffset = collectionView.contentSize.height - collectionView.bounds.height + collectionView.adjustedContentInset.bottom if #available(iOS 11.0, *) { yOffset += view.safeAreaInsets.bottom } diff --git a/SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentApprovalInputAccessoryView.swift b/SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentApprovalInputAccessoryView.swift index a28986786..4732da2d0 100644 --- a/SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentApprovalInputAccessoryView.swift +++ b/SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentApprovalInputAccessoryView.swift @@ -61,7 +61,7 @@ class AttachmentApprovalInputAccessoryView: UIView { // Use a background view that extends below the keyboard to avoid animation glitches. let backgroundView = UIView() - backgroundView.backgroundColor = isLightMode ? UIColor.black.withAlphaComponent(0.2) : UIColor.black.withAlphaComponent(0.6) + backgroundView.backgroundColor = UIColor.black.withAlphaComponent(0.6) addSubview(backgroundView) backgroundView.autoPinEdgesToSuperviewEdges()