From 1c9e73e2c7f94f06494f62b40d5bbb5aa14a06d0 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 2 Sep 2022 11:38:19 +0800 Subject: [PATCH] Move tap gesture to the article title, use an animation on transition --- .../Sources/App/Views/AudioPlayer/MiniPlayer.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift index 2b2526762..f168e0090 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift @@ -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()