mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-19 07:32:08 +00:00
yes
This commit is contained in:
parent
59e1a47b52
commit
73f940f818
3 changed files with 44 additions and 4 deletions
|
|
@ -1701,7 +1701,11 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
|
|||
}
|
||||
|
||||
@objc func dismissTapped() {
|
||||
dismiss(animated: true, completion: nil)
|
||||
if let presentingViewController = self.presentingViewController {
|
||||
presentingViewController.dismiss(animated: true, completion: nil)
|
||||
} else {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func watchNextTapped() {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ struct SearchView: View {
|
|||
.padding(.top, 20)
|
||||
|
||||
ScrollView {
|
||||
SearchContent(
|
||||
SearchContentView(
|
||||
selectedModule: selectedModule,
|
||||
searchQuery: searchQuery,
|
||||
searchHistory: searchHistory,
|
||||
|
|
|
|||
|
|
@ -105,6 +105,43 @@ struct ModuleSelectorMenu: View {
|
|||
}
|
||||
}
|
||||
|
||||
struct SearchContentView: View {
|
||||
let selectedModule: ScrapingModule?
|
||||
let searchQuery: String
|
||||
let searchHistory: [String]
|
||||
let searchItems: [SearchItem]
|
||||
let isSearching: Bool
|
||||
let hasNoResults: Bool
|
||||
let columns: [GridItem]
|
||||
let columnsCount: Int
|
||||
let cellWidth: CGFloat
|
||||
let onHistoryItemSelected: (String) -> Void
|
||||
let onHistoryItemDeleted: (Int) -> Void
|
||||
let onClearHistory: () -> Void
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
SearchContent(
|
||||
selectedModule: selectedModule,
|
||||
searchQuery: searchQuery,
|
||||
searchHistory: searchHistory,
|
||||
searchItems: searchItems,
|
||||
isSearching: isSearching,
|
||||
hasNoResults: hasNoResults,
|
||||
columns: columns,
|
||||
columnsCount: columnsCount,
|
||||
cellWidth: cellWidth,
|
||||
onHistoryItemSelected: onHistoryItemSelected,
|
||||
onHistoryItemDeleted: onHistoryItemDeleted,
|
||||
onClearHistory: onClearHistory
|
||||
)
|
||||
.navigationTitle("Search")
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
}
|
||||
|
||||
struct SearchContent: View {
|
||||
let selectedModule: ScrapingModule?
|
||||
let searchQuery: String
|
||||
|
|
@ -188,6 +225,5 @@ struct SearchContent: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue