parent
44468b5d1f
commit
bd4aeed97a
|
@ -58,6 +58,7 @@ struct ProfileGridView: View, Routable, TunnelInstallationProviding {
|
|||
if !isSearching {
|
||||
headerView(scrollProxy: scrollProxy)
|
||||
.padding(.bottom)
|
||||
.unanimated()
|
||||
}
|
||||
LazyVGrid(columns: columns) {
|
||||
ForEach(allHeaders, content: profileView)
|
||||
|
|
|
@ -60,6 +60,7 @@ struct ProfileListView: View, Routable, TunnelInstallationProviding {
|
|||
Form {
|
||||
if !isSearching {
|
||||
headerView(scrollProxy: scrollProxy)
|
||||
.unanimated()
|
||||
}
|
||||
Group {
|
||||
ForEach(allHeaders, content: profileView)
|
||||
|
|
|
@ -42,6 +42,13 @@ extension View {
|
|||
public func opaque(_ condition: Bool) -> some View {
|
||||
opacity(condition ? 1.0 : 0.0)
|
||||
}
|
||||
|
||||
// https://www.avanderlee.com/swiftui/disable-animations-transactions/
|
||||
public func unanimated() -> some View {
|
||||
transaction {
|
||||
$0.animation = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ViewModifier {
|
||||
|
|
Loading…
Reference in New Issue