use task rather than onAppear for loading initial items

This commit is contained in:
Satindar Dhillon
2022-05-20 08:54:16 -07:00
parent 9858cc8413
commit 12c2f8ab62

View File

@ -128,7 +128,7 @@ private let enableGrid = UIDevice.isIPad || FeatureFlag.enableGridCardsOnPhone
}
}
}
.onAppear { // TODO: use task instead
.task {
if viewModel.items.isEmpty {
loadItems(isRefresh: true)
}