Cache settings

This commit is contained in:
Arkadiusz Fal
2022-12-13 12:09:20 +01:00
parent 8f2b570163
commit e4d583a263
6 changed files with 69 additions and 22 deletions

View File

@@ -22,6 +22,7 @@ struct PlaylistsView: View {
@Namespace private var focusNamespace
@Default(.playlistListingStyle) private var playlistListingStyle
@Default(.showCacheStatus) private var showCacheStatus
var items: [ContentItem] {
var videos = currentPlaylist?.videos ?? []
@@ -77,13 +78,15 @@ struct PlaylistsView: View {
Spacer()
#else
VerticalCells(items: items) {
HStack {
Spacer()
if showCacheStatus {
HStack {
Spacer()
CacheStatusHeader(
refreshTime: cache.getFormattedPlaylistTime(account: accounts.current),
isLoading: model.isLoading
)
CacheStatusHeader(
refreshTime: cache.getFormattedPlaylistTime(account: accounts.current),
isLoading: model.isLoading
)
}
}
}
.environment(\.scrollViewBottomPadding, 70)