Add pull-to-refresh functionality and improve loading states across iOS views

- Added pull-to-refresh to ResidencesListView with force refresh support
- Added pull-to-refresh to AllTasksView with rotating refresh button
- Added pull-to-refresh to ContractorsListView with force refresh
- Added pull-to-refresh to DocumentsTabContent and WarrantiesTabContent
- Improved loading state checks to prevent empty list flash during initial load
- Added refresh button to AllTasksView toolbar with clockwise rotation animation
- Improved UX by disabling refresh button while loading is in progress

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-12 21:11:50 -06:00
parent a61cada072
commit b1a24014ab
9 changed files with 45 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ struct ResidencesListView: View {
AppColors.background
.ignoresSafeArea()
if viewModel.isLoading {
if viewModel.myResidences == nil && viewModel.isLoading {
VStack(spacing: AppSpacing.lg) {
ProgressView()
.scaleEffect(1.2)
@@ -59,6 +59,9 @@ struct ResidencesListView: View {
}
.padding(.bottom, AppSpacing.xxxl)
}
.refreshable {
viewModel.loadMyResidences(forceRefresh: true)
}
.safeAreaInset(edge: .bottom) {
Color.clear.frame(height: 0)
}
@@ -66,7 +69,7 @@ struct ResidencesListView: View {
}
}
.navigationTitle("My Properties")
.navigationBarTitleDisplayMode(.large)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
Button(action: {