Fixes #1950 - Show a loading indicator while searching for people to … (#2158)

* Fixes #1950 - Show a loading indicator while searching for people to invite

* Address PR comments
This commit is contained in:
Stefan Ceriu
2023-11-23 19:56:49 +02:00
committed by GitHub
parent 33d36826a2
commit 07eccbee8c
4 changed files with 21 additions and 9 deletions
@@ -40,15 +40,22 @@ struct InviteUsersScreen: View {
private var mainContent: some View {
Form {
if !context.viewState.selectedUsers.isEmpty {
// this is a fix for having the carousel not clipped, and inside the form, so when the search is dismissed, it wont break the design
Section {
EmptyView()
} header: {
// this is a fix for having the carousel not clipped, and inside the form, so when the search is dismissed, it wont break the design
Section {
EmptyView()
} header: {
VStack(spacing: 8) {
selectedUsersSection
.textCase(.none)
if context.viewState.isSearching {
ProgressView()
.frame(maxWidth: .infinity, alignment: .center)
.listRowBackground(Color.clear)
}
}
}
if context.viewState.hasEmptySearchResults {
noResultsContent
} else {