Skip to content

Commit f557270

Browse files
committed
Cancel dragging progress when app enters background
1 parent 24ef55a commit f557270

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

WooCommerce/Classes/ViewRelated/ReusableViews/SwiftUI Components/ExpandableBottomSheet.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ struct ExpandableBottomSheet<AlwaysVisibleContent, ExpandableContent>: View wher
158158
}
159159
)
160160
.background(Color(.listForeground(modal: false)))
161+
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
162+
revealContentDuringDrag = false
163+
}
161164
}
162165

163166
private func calculateHeight(offsetBy dragAmount: CGFloat = 0) -> CGFloat {

0 commit comments

Comments
 (0)