diff --git a/Splito/UI/Home/Groups/Group/GroupExpenseListView.swift b/Splito/UI/Home/Groups/Group/GroupExpenseListView.swift index 99067f5a..ba43f01b 100644 --- a/Splito/UI/Home/Groups/Group/GroupExpenseListView.swift +++ b/Splito/UI/Home/Groups/Group/GroupExpenseListView.swift @@ -82,17 +82,16 @@ struct GroupExpenseListView: View { viewModel.manageScrollToTopBtnVisibility(true) } } - - if expense.expense.id == viewModel.groupExpenses[month]?.last?.expense.id && viewModel.hasMoreExpenses { - ProgressView() - .frame(maxWidth: .infinity, alignment: .center) - .onAppear { - viewModel.loadMoreExpenses() - }.padding(.vertical, 8) - } } } } + + if viewModel.hasMoreExpenses { + ProgressView() + .frame(maxWidth: .infinity, alignment: .center) + .onAppear(perform: viewModel.loadMoreExpenses) + .padding(.vertical, 8) + } } else if viewModel.groupExpenses.isEmpty && viewModel.showSearchBar { ExpenseNotFoundView(geometry: geometry, searchedExpense: viewModel.searchedExpense) }