File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ private extension CellularNotAllowedOverlay {
62
62
63
63
NSLayoutConstraint . activate ( [
64
64
overlayViewController. view. layoutMarginsGuide. centerXAnchor. constraint ( equalTo: overlayView. centerXAnchor) ,
65
- overlayViewController. view. layoutMarginsGuide. leadingAnchor. constraint ( greaterThanOrEqualTo : overlayView. leadingAnchor) ,
66
- overlayView. trailingAnchor. constraint ( greaterThanOrEqualTo : overlayViewController. view. layoutMarginsGuide. trailingAnchor) ,
65
+ overlayViewController. view. layoutMarginsGuide. leadingAnchor. constraint ( equalTo : overlayView. leadingAnchor) ,
66
+ overlayView. trailingAnchor. constraint ( equalTo : overlayViewController. view. layoutMarginsGuide. trailingAnchor) ,
67
67
bottomConstraint
68
68
] )
69
69
@@ -146,6 +146,15 @@ private extension CellularNotAllowedOverlay {
146
146
147
147
@MainActor
148
148
func showCellularPreferences( ) {
149
+ // Open iOS settings app, if restricted on system level
150
+ if networkMonitoringService. cellularState == . restricted,
151
+ let url = URL ( string: UIApplication . openSettingsURLString)
152
+ {
153
+ UIApplication . shared. open ( url)
154
+ return
155
+ }
156
+
157
+ // Otherwise open iTorrent's Preferences
149
158
guard let scene = UIApplication . shared. connectedScenes. compactMap ( { $0 as? UIWindowScene } ) . first,
150
159
let window = scene. keyWindow,
151
160
let viewController = window. rootViewController? . topPresented
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ class MessageOverlayView: BaseView {
28
28
holder. layoutMargins. right = 16
29
29
30
30
holder. layer. borderWidth = 1 / traitCollection. displayScale
31
- holder. layer. borderColor = UIColor . separator. cgColor
32
31
33
32
holder. addAction ( . init { [ unowned self] _ in
34
33
Task { await clickEvent ? ( ) }
@@ -41,6 +40,11 @@ class MessageOverlayView: BaseView {
41
40
}
42
41
}
43
42
43
+ override func layoutSubviews( ) {
44
+ super. layoutSubviews ( )
45
+ holder. layer. borderColor = UIColor . separator. cgColor
46
+ }
47
+
44
48
override func hitTest( _ point: CGPoint , with event: UIEvent ? ) -> UIView ? {
45
49
let view = super. hitTest ( point, with: event)
46
50
if view == self { return nil }
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <document type =" com.apple.InterfaceBuilder3.CocoaTouch.XIB" version =" 3.0" toolsVersion =" 23077.2 " targetRuntime =" iOS.CocoaTouch" propertyAccessControl =" none" useAutolayout =" YES" useTraitCollections =" YES" useSafeAreas =" YES" colorMatched =" YES" >
2
+ <document type =" com.apple.InterfaceBuilder3.CocoaTouch.XIB" version =" 3.0" toolsVersion =" 23094 " targetRuntime =" iOS.CocoaTouch" propertyAccessControl =" none" useAutolayout =" YES" useTraitCollections =" YES" useSafeAreas =" YES" colorMatched =" YES" >
3
3
<device id =" retina6_12" orientation =" portrait" appearance =" light" />
4
4
<dependencies >
5
5
<deployment identifier =" iOS" />
6
- <plugIn identifier =" com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version =" 23068.1 " />
6
+ <plugIn identifier =" com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version =" 23084 " />
7
7
<capability name =" Safe area layout guides" minToolsVersion =" 9.0" />
8
8
<capability name =" System colors in document resources" minToolsVersion =" 11.0" />
9
9
<capability name =" documents saved in the Xcode 8 format" minToolsVersion =" 8.0" />
33
33
</collectionView >
34
34
<view contentMode =" scaleToFill" placeholderIntrinsicWidth =" 393" placeholderIntrinsicHeight =" 64" translatesAutoresizingMaskIntoConstraints =" NO" id =" JsX-Hm-a5W" customClass =" AdView" customModule =" iTorrent" customModuleProvider =" target" >
35
35
<rect key =" frame" x =" 0.0" y =" 818" width =" 393" height =" 64" />
36
+ <constraints >
37
+ <constraint firstAttribute =" height" priority =" 1" id =" uHw-fl-G7b" />
38
+ </constraints >
36
39
</view >
37
40
</subviews >
38
41
<viewLayoutGuide key =" safeArea" id =" fnl-2z-Ty3" />
You can’t perform that action at this time.
0 commit comments