mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-19 07:32:08 +00:00
test???????
This commit is contained in:
parent
e05991a631
commit
8e0dd3d7b0
6 changed files with 9 additions and 27 deletions
|
|
@ -134,7 +134,7 @@ extension JSContext {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var responseDict: [String: Any] = [
|
||||
"status": (response as? HTTPURLResponse)?.statusCode ?? 0,
|
||||
"headers": safeHeaders,
|
||||
|
|
@ -151,7 +151,7 @@ extension JSContext {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let text = String(data: data, encoding: .utf8) {
|
||||
responseDict["body"] = text
|
||||
DispatchQueue.main.async {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ extension UserDefaults {
|
|||
let data = try NSKeyedArchiver.archivedData(withRootObject: color, requiringSecureCoding: false)
|
||||
set(data, forKey: key)
|
||||
} catch {
|
||||
print("Error archiving color: \(error)")
|
||||
Logger.shared.log("Error archiving color: \(error)", type: "Error")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ extension View {
|
|||
func shimmering() -> some View {
|
||||
modifier(Shimmer())
|
||||
}
|
||||
|
||||
|
||||
func scrollViewBottomPadding() -> some View {
|
||||
modifier(ScrollViewBottomPadding())
|
||||
}
|
||||
|
|
@ -66,6 +66,7 @@ struct SearchResultsGrid: View {
|
|||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||
.padding(4)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
}
|
||||
.padding(.top)
|
||||
|
|
|
|||
|
|
@ -166,14 +166,6 @@ struct SearchView: View {
|
|||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
private func lockOrientation() {
|
||||
OrientationManager.shared.lockOrientation()
|
||||
}
|
||||
|
||||
private func unlockOrientation(after delay: TimeInterval = 0.2) {
|
||||
OrientationManager.shared.unlockOrientation(after: delay)
|
||||
}
|
||||
|
||||
private func performSearch() {
|
||||
Logger.shared.log("Searching for: \(searchQuery)", type: "General")
|
||||
guard !searchQuery.isEmpty, let module = selectedModule else {
|
||||
|
|
@ -188,8 +180,6 @@ struct SearchView: View {
|
|||
hasNoResults = false
|
||||
searchItems = []
|
||||
|
||||
lockOrientation()
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
Task {
|
||||
do {
|
||||
|
|
@ -201,7 +191,6 @@ struct SearchView: View {
|
|||
searchItems = items
|
||||
hasNoResults = items.isEmpty
|
||||
isSearching = false
|
||||
unlockOrientation(after: 3.0)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -210,7 +199,6 @@ struct SearchView: View {
|
|||
searchItems = items
|
||||
hasNoResults = items.isEmpty
|
||||
isSearching = false
|
||||
unlockOrientation(after: 3.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +207,6 @@ struct SearchView: View {
|
|||
DispatchQueue.main.async {
|
||||
isSearching = false
|
||||
hasNoResults = true
|
||||
unlockOrientation(after: 3.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -259,12 +246,6 @@ struct SearchView: View {
|
|||
saveSearchHistory()
|
||||
}
|
||||
|
||||
private func updateOrientation() {
|
||||
DispatchQueue.main.async {
|
||||
isLandscape = UIDevice.current.orientation.isLandscape
|
||||
}
|
||||
}
|
||||
|
||||
private func determineColumns() -> Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
04F08EE22DE10C40006B29D9 /* TabItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F08EE12DE10C27006B29D9 /* TabItem.swift */; };
|
||||
04F08EE42DE10D6F006B29D9 /* AllBookmarks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F08EE32DE10D6B006B29D9 /* AllBookmarks.swift */; };
|
||||
130C6BFA2D53AB1F00DC1432 /* SettingsViewData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130C6BF92D53AB1F00DC1432 /* SettingsViewData.swift */; };
|
||||
13103E8B2D58E028000F0673 /* ScrollViewBottomPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13103E8A2D58E028000F0673 /* ScrollViewBottomPadding.swift */; };
|
||||
13103E8B2D58E028000F0673 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13103E8A2D58E028000F0673 /* View.swift */; };
|
||||
13103E8E2D58E04A000F0673 /* SkeletonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13103E8D2D58E04A000F0673 /* SkeletonCell.swift */; };
|
||||
131270172DC13A010093AA9C /* DownloadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131270162DC13A010093AA9C /* DownloadManager.swift */; };
|
||||
131845F92D47C62D00CA7A54 /* SettingsViewGeneral.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131845F82D47C62D00CA7A54 /* SettingsViewGeneral.swift */; };
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
04F08EE32DE10D6B006B29D9 /* AllBookmarks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllBookmarks.swift; sourceTree = "<group>"; };
|
||||
130C6BF82D53A4C200DC1432 /* Sora.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Sora.entitlements; sourceTree = "<group>"; };
|
||||
130C6BF92D53AB1F00DC1432 /* SettingsViewData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewData.swift; sourceTree = "<group>"; };
|
||||
13103E8A2D58E028000F0673 /* ScrollViewBottomPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollViewBottomPadding.swift; sourceTree = "<group>"; };
|
||||
13103E8A2D58E028000F0673 /* View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = View.swift; sourceTree = "<group>"; };
|
||||
13103E8D2D58E04A000F0673 /* SkeletonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkeletonCell.swift; sourceTree = "<group>"; };
|
||||
131270162DC13A010093AA9C /* DownloadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadManager.swift; sourceTree = "<group>"; };
|
||||
131845F82D47C62D00CA7A54 /* SettingsViewGeneral.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewGeneral.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -420,7 +420,7 @@
|
|||
133D7C872D2BE2640075467E /* URLSession.swift */,
|
||||
1359ED132D76F49900C13034 /* finTopView.swift */,
|
||||
13CBEFD92D5F7D1200D011EE /* String.swift */,
|
||||
13103E8A2D58E028000F0673 /* ScrollViewBottomPadding.swift */,
|
||||
13103E8A2D58E028000F0673 /* View.swift */,
|
||||
13DB468F2D900A38008CBC03 /* URL.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
|
|
@ -758,7 +758,7 @@
|
|||
04CD76DB2DE20F2200733536 /* AllWatching.swift in Sources */,
|
||||
13103E8E2D58E04A000F0673 /* SkeletonCell.swift in Sources */,
|
||||
13D842552D45267500EBBFA6 /* DropManager.swift in Sources */,
|
||||
13103E8B2D58E028000F0673 /* ScrollViewBottomPadding.swift in Sources */,
|
||||
13103E8B2D58E028000F0673 /* View.swift in Sources */,
|
||||
72443C7D2DC8036500A61321 /* DownloadView.swift in Sources */,
|
||||
1327FBA92D758DEA00FC6689 /* UIDevice+Model.swift in Sources */,
|
||||
138AA1B82D2D66FD0021F9DF /* EpisodeCell.swift in Sources */,
|
||||
|
|
|
|||
Loading…
Reference in a new issue