diff --git a/Telegram-iOS/Telegram-iOS-AppStore.entitlements b/Telegram/Telegram-iOS/Telegram-iOS-AppStore.entitlements similarity index 100% rename from Telegram-iOS/Telegram-iOS-AppStore.entitlements rename to Telegram/Telegram-iOS/Telegram-iOS-AppStore.entitlements diff --git a/Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements b/Telegram/Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements similarity index 100% rename from Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements rename to Telegram/Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements diff --git a/Telegram-iOS/Telegram-iOS-Fork.entitlements b/Telegram/Telegram-iOS/Telegram-iOS-Fork.entitlements similarity index 100% rename from Telegram-iOS/Telegram-iOS-Fork.entitlements rename to Telegram/Telegram-iOS/Telegram-iOS-Fork.entitlements diff --git a/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements b/Telegram/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements similarity index 100% rename from Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements rename to Telegram/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements diff --git a/submodules/GalleryUI/Sources/GalleryPagerNode.swift b/submodules/GalleryUI/Sources/GalleryPagerNode.swift index e019c58b2b..d51503ae6c 100644 --- a/submodules/GalleryUI/Sources/GalleryPagerNode.swift +++ b/submodules/GalleryUI/Sources/GalleryPagerNode.swift @@ -5,6 +5,8 @@ import Display import SwiftSignalKit import Postbox +private let edgeWidth: CGFloat = 44.0 + private let leftFadeImage = generateImage(CGSize(width: 64.0, height: 1.0), opaque: false, rotatedContext: { size, context in let bounds = CGRect(origin: CGPoint(), size: size) context.clear(bounds) @@ -154,11 +156,11 @@ public final class GalleryPagerNode: ASDisplayNode, UIScrollViewDelegate, UIGest var highlightedSide: Bool? if let point = point { - if point.x < size.width * 1.0 / 5.0 { + if point.x < edgeWidth && strongSelf.canGoToPreviousItem() { if strongSelf.items.count > 1 { highlightedSide = false } - } else { + } else if point.x > size.width - edgeWidth && strongSelf.canGoToNextItem() { if strongSelf.items.count > 1 { highlightedSide = true } @@ -207,9 +209,9 @@ public final class GalleryPagerNode: ASDisplayNode, UIScrollViewDelegate, UIGest if let (gesture, location) = recognizer.lastRecognizedGestureAndLocation { if case .tap = gesture { let size = self.bounds.size - if location.x < size.width * 1.0 / 5.0 && self.canGoToPreviousItem() { + if location.x < edgeWidth && self.canGoToPreviousItem() { self.goToPreviousItem() - } else if self.canGoToNextItem() { + } else if location.x > size.width - edgeWidth && self.canGoToNextItem() { self.goToNextItem() } }