mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Move tap gesture to the article title, use an animation on transition
This commit is contained in:
parent
4aca2c1c8f
commit
1c9e73e2c7
1 changed files with 6 additions and 6 deletions
|
|
@ -141,12 +141,6 @@ public struct MiniPlayer: View {
|
|||
.frame(width: dim, height: dim)
|
||||
.cornerRadius(6)
|
||||
}
|
||||
.onTapGesture(count: 2) {
|
||||
if expanded {
|
||||
expanded = false
|
||||
NSNotification.pushReaderItem(objectID: item.objectID)
|
||||
}
|
||||
}
|
||||
|
||||
if !expanded {
|
||||
Text(item.unwrappedTitle)
|
||||
|
|
@ -176,6 +170,12 @@ public struct MiniPlayer: View {
|
|||
.foregroundColor(.appGrayTextContrast)
|
||||
.frame(maxWidth: .infinity, alignment: expanded ? .center : .leading)
|
||||
.matchedGeometryEffect(id: "ArticleTitle", in: animation)
|
||||
.onTapGesture {
|
||||
NSNotification.pushReaderItem(objectID: item.objectID)
|
||||
withAnimation(.easeIn(duration: 0.1)) {
|
||||
expanded = false
|
||||
}
|
||||
}
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
|
|
|
|||
Loading…
Reference in a new issue