Fix lint issues

This commit is contained in:
Arkadiusz Fal
2023-06-17 14:09:51 +02:00
parent b12933e61d
commit e827b97cd5
40 changed files with 130 additions and 101 deletions

View File

@@ -338,7 +338,8 @@ struct ChannelVideosView: View {
private var resource: Resource? {
guard let channel = presentedChannel else { return nil }
let data = contentType != .videos ? channel.tabs.first(where: { $0.contentType == contentType })?.data : nil
let tabData = channel.tabs.first { $0.contentType == contentType }?.data
let data = contentType != .videos ? tabData : nil
let resource = accounts.api.channel(channel.id, contentType: contentType, data: data)
if contentType == .videos {
@@ -451,7 +452,8 @@ struct ChannelVideosView: View {
next = next ?? ""
}
let data = contentType != .videos ? channel.tabs.first(where: { $0.contentType == contentType })?.data : nil
let tabData = channel.tabs.first { $0.contentType == contentType }?.data
let data = contentType != .videos ? tabData : nil
accounts.api.channel(channel.id, contentType: contentType, data: data, page: next).load().onSuccess { response in
if let page: ChannelPage = response.typedContent() {
self.page = page