mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add loading status to vertical cells
This commit is contained in:
@@ -42,21 +42,9 @@ struct FavoriteItemView: View {
|
||||
.padding(.leading, 15)
|
||||
#endif
|
||||
|
||||
if limitedItems.isEmpty, !(resource?.isLoading ?? false) {
|
||||
VStack(alignment: .leading) {
|
||||
Text(emptyItemsText)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
if hideShorts || hideWatched {
|
||||
AccentButton(text: "Disable filters", maxWidth: nil, verticalPadding: 0, minHeight: 30) {
|
||||
hideShorts = false
|
||||
hideWatched = false
|
||||
reloadVisibleWatches()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 10)
|
||||
if limitedItems.isEmpty {
|
||||
EmptyItems(isLoading: resource?.isLoading ?? false) { reloadVisibleWatches() }
|
||||
.padding(.vertical, 10)
|
||||
#if os(tvOS)
|
||||
.padding(.horizontal, 40)
|
||||
#else
|
||||
@@ -113,19 +101,6 @@ struct FavoriteItemView: View {
|
||||
}
|
||||
}
|
||||
|
||||
var emptyItemsText: String {
|
||||
var filterText = ""
|
||||
if hideShorts && hideWatched {
|
||||
filterText = "(watched and shorts hidden)"
|
||||
} else if hideShorts {
|
||||
filterText = "(shorts hidden)"
|
||||
} else if hideWatched {
|
||||
filterText = "(watched hidden)"
|
||||
}
|
||||
|
||||
return "No videos to show".localized() + " " + filterText.localized()
|
||||
}
|
||||
|
||||
var contextMenu: some View {
|
||||
Group {
|
||||
if item.section == .history {
|
||||
|
Reference in New Issue
Block a user