File tree Expand file tree Collapse file tree 3 files changed +25
-13
lines changed
Expand file tree Collapse file tree 3 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ final class AppListModel: ObservableObject {
6363 false
6464 }
6565 } ( )
66- private let filzaURL = URL ( string: " filza:// " )
66+ private let filzaURL = URL ( string: " filza://view " )
6767
6868 @Published var isRebuildNeeded : Bool = false
6969
@@ -206,7 +206,14 @@ extension AppListModel {
206206 guard let filzaURL else {
207207 return
208208 }
209- let fileURL = filzaURL. appendingPathComponent ( url. path)
209+
210+ let fileURL : URL
211+ if #available( iOS 16 , * ) {
212+ fileURL = filzaURL. appending ( path: url. path)
213+ } else {
214+ fileURL = URL ( string: filzaURL. absoluteString + ( url. path. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) ?? " " ) ) !
215+ }
216+
210217 UIApplication . shared. open ( fileURL)
211218 }
212219
Original file line number Diff line number Diff line change @@ -110,13 +110,17 @@ struct AppListView: View {
110110 else {
111111 return
112112 }
113+
113114 let urlIdent = URLIdentifiable ( url: preprocessURL ( url) )
114- if !isWarningHidden && ext == " deb " {
115- temporaryOpenedURL = urlIdent
116- isWarningPresented = true
117- } else {
118- selectorOpenedURL = urlIdent
115+ if #available( iOS 15 , * ) {
116+ if !isWarningHidden && ext == " deb " {
117+ temporaryOpenedURL = urlIdent
118+ isWarningPresented = true
119+ return
120+ }
119121 }
122+
123+ selectorOpenedURL = urlIdent
120124 }
121125 . onAppear {
122126 if Double . random ( in: 0 ..< 1 ) < 0.1 {
Original file line number Diff line number Diff line change @@ -144,13 +144,14 @@ struct OptionView: View {
144144 result in
145145 switch result {
146146 case let . success( theSuccess) :
147- if !isWarningHidden && theSuccess . contains ( where : { $0 . pathExtension . lowercased ( ) == " deb " } ) {
148- temporaryResult = result
149- isWarningPresented = true
150- } else {
151- importerResult = result
152- isImporterSelected = true
147+ if #available ( iOS 15 , * ) {
148+ if !isWarningHidden && theSuccess . contains ( where : { $0 . pathExtension . lowercased ( ) == " deb " } ) {
149+ temporaryResult = result
150+ isWarningPresented = true
151+ return
152+ }
153153 }
154+ fallthrough
154155 case . failure:
155156 importerResult = result
156157 isImporterSelected = true
You can’t perform that action at this time.
0 commit comments