minor feedback cleanup

This commit is contained in:
jhays 2021-11-23 08:19:03 -06:00
parent c98f63c5e4
commit 1bafa774de
3 changed files with 17 additions and 22 deletions

View File

@ -32,8 +32,6 @@ struct LibraryListView: View {
}
label: {
ZStack {
ImageView(src: library.getPrimaryImage(maxWidth: 500), bh: library.getPrimaryImageBlurHash())
.opacity(0.4)
HStack {
Spacer()
VStack {
@ -44,7 +42,7 @@ struct LibraryListView: View {
}
Spacer()
}.padding(32)
}.background(Color.black)
}
.frame(minWidth: 100, maxWidth: .infinity)
.frame(height: 100)
}

View File

@ -36,7 +36,7 @@ struct LiveTVChannelsView: View {
VStack {
Text("No results.")
Button {
print("movieLibraries reload")
viewModel.getChannels()
} label: {
Text("Reload")
}
@ -45,24 +45,21 @@ struct LiveTVChannelsView: View {
}
@ViewBuilder func makeCellView(indexPath: IndexPath, cell: LiveTVChannelRowCell) -> some View {
GeometryReader { _ in
if let item = cell.item,
let channel = item.channel{
if channel.type != "Folder" {
Button {
self.router.route(to: \.videoPlayer, channel)
} label: {
LiveTVChannelItemElement(
channel: channel,
program: item.program,
startString: item.program?.getLiveStartTimeString(formatter: viewModel.timeFormatter) ?? " ",
endString: item.program?.getLiveEndTimeString(formatter: viewModel.timeFormatter) ?? " ",
progressPercent: item.program?.getLiveProgressPercentage() ?? 0
)
}
.buttonStyle(PlainNavigationLinkButtonStyle())
}
let item = cell.item
let channel = item.channel
if channel.type != "Folder" {
Button {
self.router.route(to: \.videoPlayer, channel)
} label: {
LiveTVChannelItemElement(
channel: channel,
program: item.program,
startString: item.program?.getLiveStartTimeString(formatter: viewModel.timeFormatter) ?? " ",
endString: item.program?.getLiveEndTimeString(formatter: viewModel.timeFormatter) ?? " ",
progressPercent: item.program?.getLiveProgressPercentage() ?? 0
)
}
.buttonStyle(PlainNavigationLinkButtonStyle())
}
}

View File

@ -66,7 +66,7 @@ final class LiveTVChannelsViewModel: ViewModel {
.store(in: &cancellables)
}
private func getChannels() {
func getChannels() {
LiveTvAPI.getLiveTvChannels(
userId: SessionManager.main.currentLogin.user.id,
startIndex: 0,