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:
Davide 2024-12-09 00:53:46 +01:00 committed by GitHub
parent f1a0ecadfa
commit 52bda60b05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -108,8 +108,6 @@ private struct ContainerModifier: ViewModifier {
.onChange(of: search) {
profileManager.search(byName: $0)
}
.themeAnimation(on: profileManager.isReady, category: .profiles)
.themeAnimation(on: profileManager.previews, category: .profiles)
}
private func emptyView() -> some View {

View File

@ -73,6 +73,8 @@ struct ProfileGridView: View, Routable, TunnelInstallationProviding {
}
.padding(.horizontal)
}
.themeAnimation(on: profileManager.isReady, category: .profiles)
.themeAnimation(on: profileManager.previews, category: .profiles)
}
.onReceive(tunnel.currentProfilePublisher) {
currentProfile = $0

View File

@ -71,6 +71,8 @@ struct ProfileListView: View, Routable, TunnelInstallationProviding {
.themeSection(header: Strings.Views.App.Folders.default)
}
.themeForm()
.themeAnimation(on: profileManager.isReady, category: .profiles)
.themeAnimation(on: profileManager.previews, category: .profiles)
}
}
}