It seems that views become not lazy in fullScreenCover.
Try to use this:
struct DeferView<Content: View>: View {
let content: () -> Content
init(@ViewBuilder _ content: @escaping () -> Content) {
self.content = content
}
var body: some View {
content()
}
}
DeferView {
your content
}
Post
Replies
Boosts
Views
Activity
add in viewModel class:
@Published var viewAppear = false
add init:
init() {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.viewAppear = true
}
}
In view:
.animation(viewModel.viewAppear ? .linear : nil)