Moved the LoadingView component to the overlay of the content of the BrowseView view for the Browse module.

This commit is contained in:
Javier Cicchelli 2022-12-18 14:48:28 +01:00
parent fdb4e16d32
commit b6a18b8ad9

View File

@ -61,6 +61,11 @@ public struct BrowseView: View {
showProfile: showProfile showProfile: showProfile
) )
} }
.overlay {
if status == .loading {
LoadingView()
}
}
.sheet(item: $showSheet) { sheet in .sheet(item: $showSheet) { sheet in
switch sheet { switch sheet {
case let .upload(id): case let .upload(id):
@ -106,9 +111,8 @@ private extension BrowseView {
) )
case .notSupported: case .notSupported:
EmptyView() EmptyView()
case .loading: case .loading,
LoadingView() .loaded:
case .loaded:
List(items, id: \.id) { item in List(items, id: \.id) { item in
switch item { switch item {
case is Folder: case is Folder: