mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Initial PeerTube Support
This commit is contained in:
@@ -58,7 +58,7 @@ struct SearchView: View {
|
||||
VStack {
|
||||
SearchTextField(favoriteItem: $favoriteItem)
|
||||
|
||||
if state.query.query != state.queryText {
|
||||
if accounts.app.supportsSearchSuggestions, state.query.query != state.queryText {
|
||||
SearchSuggestions()
|
||||
.opacity(state.queryText.isEmpty ? 0 : 1)
|
||||
} else {
|
||||
@@ -72,7 +72,7 @@ struct SearchView: View {
|
||||
results
|
||||
|
||||
#if os(macOS)
|
||||
if state.query.query != state.queryText {
|
||||
if accounts.app.supportsSearchSuggestions, state.query.query != state.queryText {
|
||||
HStack {
|
||||
Spacer()
|
||||
SearchSuggestions()
|
||||
@@ -122,6 +122,9 @@ struct SearchView: View {
|
||||
state.store.replace(ContentItem.array(of: videos))
|
||||
}
|
||||
}
|
||||
.onChange(of: accounts.current) { _ in
|
||||
state.reloadQuery()
|
||||
}
|
||||
.onChange(of: state.queryText) { newQuery in
|
||||
if newQuery.isEmpty {
|
||||
favoriteItem = nil
|
||||
|
Reference in New Issue
Block a user