Fix missing animations in profiles list (#986)
The list was not animating e.g. on iCloud updates. Move .themeAnimation() from ProfileContainerView (ContainerModifier) to ProfileListView/ProfileGridView.
This commit is contained in:
parent
f1a0ecadfa
commit
52bda60b05
|
@ -108,8 +108,6 @@ private struct ContainerModifier: ViewModifier {
|
||||||
.onChange(of: search) {
|
.onChange(of: search) {
|
||||||
profileManager.search(byName: $0)
|
profileManager.search(byName: $0)
|
||||||
}
|
}
|
||||||
.themeAnimation(on: profileManager.isReady, category: .profiles)
|
|
||||||
.themeAnimation(on: profileManager.previews, category: .profiles)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func emptyView() -> some View {
|
private func emptyView() -> some View {
|
||||||
|
|
|
@ -73,6 +73,8 @@ struct ProfileGridView: View, Routable, TunnelInstallationProviding {
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
}
|
}
|
||||||
|
.themeAnimation(on: profileManager.isReady, category: .profiles)
|
||||||
|
.themeAnimation(on: profileManager.previews, category: .profiles)
|
||||||
}
|
}
|
||||||
.onReceive(tunnel.currentProfilePublisher) {
|
.onReceive(tunnel.currentProfilePublisher) {
|
||||||
currentProfile = $0
|
currentProfile = $0
|
||||||
|
|
|
@ -71,6 +71,8 @@ struct ProfileListView: View, Routable, TunnelInstallationProviding {
|
||||||
.themeSection(header: Strings.Views.App.Folders.default)
|
.themeSection(header: Strings.Views.App.Folders.default)
|
||||||
}
|
}
|
||||||
.themeForm()
|
.themeForm()
|
||||||
|
.themeAnimation(on: profileManager.isReady, category: .profiles)
|
||||||
|
.themeAnimation(on: profileManager.previews, category: .profiles)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue