I wish to present EmptyView() with out house if there isn’t a knowledge from sever.
If I put my code inside VStack then EmptyView() takes the house,
If I put the code with out Stack, then API is asking infinite quantity.
My code is comply with:
VStack{
if let arr = vm.arrMessages{
getContent()
.padding(.high)
}else if vm.isLoading {
ProgressView()
}else if vm.isError {
EmptyView()
}
}
Outdoors of VStack:
if let arr = vm.arrMessages{
getContent()
.padding(.high)
}else if vm.isLoading {
ProgressView()
}else if vm.isError {
EmptyView()
}
then API is asking infinite time.
thanks