This commit is contained in:
Jackson Harper 2022-11-11 15:39:47 +08:00
parent c5c59c07c0
commit eaaf1c052b
5 changed files with 17 additions and 9 deletions

View file

@ -335,10 +335,16 @@ import Views
Label { Text("Snooze") } icon: { Image.moon }
}
}
Button(
action: { viewModel.downloadAudio(audioController: audioController, item: item) },
label: { Label("Download Audio", systemImage: "icloud.and.arrow.down") }
)
if let author = item.author {
Button(
action: {
viewModel.searchTerm = "author:\"\(author)\""
},
label: {
Label(String("More by \(author)"), systemImage: "person")
}
)
}
}
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
if !item.isArchived {

View file

@ -213,6 +213,10 @@ struct WebReaderContainerView: View {
},
label: { Label("Reset Read Location", systemImage: "arrow.counterclockwise.circle") }
)
Button(
action: { /* viewModel.downloadAudio(audioController: audioController, item: item) */ },
label: { Label("Download Audio", systemImage: "icloud.and.arrow.down") }
)
Button(
action: share,
label: { Label("Share Original", systemImage: "square.and.arrow.up") }

View file

@ -71,10 +71,6 @@ public struct GridCard: View {
action: { menuActionHandler(.delete) },
label: { Label("Delete", systemImage: "trash") }
)
Button(
action: { menuActionHandler(.downloadAudio) },
label: { Label("Download Audio", systemImage: "icloud.and.arrow.down") }
)
}
}

View file

@ -76,6 +76,8 @@ public struct FeedCard: View {
}
Spacer()
}
}.introspectScrollView { scrollView in
scrollView.bounces = false
}
.padding(.top, 0)
#if os(macOS)

View file

@ -156,7 +156,7 @@ describe('query with author set', () => {
it('adds author to the match filters', () => {
const result = parseSearchQuery('author:"Omnivore Blog"')
expect(result.matchFilters[0].field).to.equal('author')
expect(result.matchFilters[0].value).to.equal('omnivore blog' })
expect(result.matchFilters[0].value).to.equal('omnivore blog')
})
})