edit loading
This commit is contained in:
		
							parent
							
								
									0a7d519567
								
							
						
					
					
						commit
						128ed5723a
					
				@ -25,18 +25,6 @@ struct BlockedUsersView: View {
 | 
			
		||||
                emptyState
 | 
			
		||||
            } else {
 | 
			
		||||
                usersSection
 | 
			
		||||
                if isLoading {
 | 
			
		||||
                    Section {
 | 
			
		||||
                        ProgressView()
 | 
			
		||||
                            .frame(maxWidth: .infinity, alignment: .center)
 | 
			
		||||
                    }
 | 
			
		||||
                } else if let errorMessage = errorMessageDown {
 | 
			
		||||
                    Text(errorMessage)
 | 
			
		||||
                        .foregroundColor(.red)
 | 
			
		||||
                        .frame(maxWidth: .infinity, alignment: .center)
 | 
			
		||||
                        .listRowSeparator(.hidden)
 | 
			
		||||
                        .listRowBackground(Color.clear)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .navigationTitle(NSLocalizedString("Заблокированные", comment: ""))
 | 
			
		||||
@ -92,8 +80,25 @@ struct BlockedUsersView: View {
 | 
			
		||||
 | 
			
		||||
    private var usersSection: some View {
 | 
			
		||||
        Section(header: Text(NSLocalizedString("Заблокированные", comment: ""))) {
 | 
			
		||||
            ForEach(blockedUsers) {
 | 
			
		||||
                user in
 | 
			
		||||
            ForEach(blockedUsers) { user in
 | 
			
		||||
                userRow(user)
 | 
			
		||||
            }
 | 
			
		||||
            if isLoading {
 | 
			
		||||
                ProgressView()
 | 
			
		||||
                    .frame(maxWidth: .infinity, alignment: .center)
 | 
			
		||||
                    .listRowBackground(Color.clear)
 | 
			
		||||
                    .listRowSeparator(.hidden)
 | 
			
		||||
            } else if let errorMessage = errorMessageDown {
 | 
			
		||||
                Text(errorMessage)
 | 
			
		||||
                    .foregroundColor(.red)
 | 
			
		||||
                    .frame(maxWidth: .infinity, alignment: .center)
 | 
			
		||||
                    .listRowBackground(Color.clear)
 | 
			
		||||
                    .listRowSeparator(.hidden)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private func userRow(_ user: BlockedUser) -> some View {
 | 
			
		||||
        HStack(spacing: 12) {
 | 
			
		||||
            Circle()
 | 
			
		||||
                .fill(Color.accentColor.opacity(0.15))
 | 
			
		||||
@ -132,8 +137,6 @@ struct BlockedUsersView: View {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private var emptyState: some View {
 | 
			
		||||
        VStack(spacing: 12) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user