Compare commits
No commits in common. "526a57b556f888024f8fc5c580c1c7c44a6b966d" and "9f6beecb49ced0f137982d55212dc8a5516ff2f9" have entirely different histories.
526a57b556
...
9f6beecb49
@ -94,6 +94,9 @@
|
||||
},
|
||||
"Email не подтверждён. Подтвердите, чтобы активировать дополнительные проверки." : {
|
||||
"comment" : "Описание необходимости подтверждения email"
|
||||
},
|
||||
"error" : {
|
||||
|
||||
},
|
||||
"Fun Fest" : {
|
||||
"comment" : "Fun Fest",
|
||||
@ -641,9 +644,6 @@
|
||||
},
|
||||
"Значение сохранено в буфере обмена." : {
|
||||
"comment" : "Сообщение после копирования"
|
||||
},
|
||||
"Идет загрузка..." : {
|
||||
|
||||
},
|
||||
"Идея" : {
|
||||
"comment" : "feedback category: idea",
|
||||
|
||||
@ -25,6 +25,14 @@ struct BlockedUsersView: View {
|
||||
emptyState
|
||||
} else {
|
||||
usersSection
|
||||
if isLoading {
|
||||
Section {
|
||||
ProgressView()
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
}
|
||||
} else if errorMessageDown != nil{
|
||||
Text("error")
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle(NSLocalizedString("Заблокированные", comment: ""))
|
||||
@ -80,26 +88,8 @@ struct BlockedUsersView: View {
|
||||
|
||||
private var usersSection: some View {
|
||||
Section(header: Text(NSLocalizedString("Заблокированные", comment: ""))) {
|
||||
ForEach(blockedUsers) { user in
|
||||
userRow(user)
|
||||
}
|
||||
if isLoading {
|
||||
Text("Идет загрузка...")
|
||||
.foregroundColor(.gray)
|
||||
.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 {
|
||||
ForEach(blockedUsers) {
|
||||
user in
|
||||
HStack(spacing: 12) {
|
||||
Circle()
|
||||
.fill(Color.accentColor.opacity(0.15))
|
||||
@ -138,6 +128,8 @@ struct BlockedUsersView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var emptyState: some View {
|
||||
VStack(spacing: 12) {
|
||||
@ -193,7 +185,7 @@ struct BlockedUsersView: View {
|
||||
if offset == 0 {
|
||||
loadError = message
|
||||
}
|
||||
// activeAlert = .error(message: message)
|
||||
activeAlert = .error(message: message)
|
||||
errorMessageDown = message
|
||||
if AppConfig.DEBUG { print("[BlockedUsersView] load blocked users failed: \(error)") }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user