parent
44468b5d1f
commit
bd4aeed97a
|
@ -58,6 +58,7 @@ struct ProfileGridView: View, Routable, TunnelInstallationProviding {
|
||||||
if !isSearching {
|
if !isSearching {
|
||||||
headerView(scrollProxy: scrollProxy)
|
headerView(scrollProxy: scrollProxy)
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
|
.unanimated()
|
||||||
}
|
}
|
||||||
LazyVGrid(columns: columns) {
|
LazyVGrid(columns: columns) {
|
||||||
ForEach(allHeaders, content: profileView)
|
ForEach(allHeaders, content: profileView)
|
||||||
|
|
|
@ -60,6 +60,7 @@ struct ProfileListView: View, Routable, TunnelInstallationProviding {
|
||||||
Form {
|
Form {
|
||||||
if !isSearching {
|
if !isSearching {
|
||||||
headerView(scrollProxy: scrollProxy)
|
headerView(scrollProxy: scrollProxy)
|
||||||
|
.unanimated()
|
||||||
}
|
}
|
||||||
Group {
|
Group {
|
||||||
ForEach(allHeaders, content: profileView)
|
ForEach(allHeaders, content: profileView)
|
||||||
|
|
|
@ -42,6 +42,13 @@ extension View {
|
||||||
public func opaque(_ condition: Bool) -> some View {
|
public func opaque(_ condition: Bool) -> some View {
|
||||||
opacity(condition ? 1.0 : 0.0)
|
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 {
|
extension ViewModifier {
|
||||||
|
|
Loading…
Reference in New Issue