Swiftformat fixes

This commit is contained in:
Arkadiusz Fal
2024-05-16 18:28:32 +02:00
parent 4b21cd48e3
commit 7741e531f4
28 changed files with 57 additions and 65 deletions

View File

@@ -57,7 +57,6 @@ import SwiftUI
}
.indicator(.activity)
.frame(width: Self.thumbnailWidth, height: Self.thumbnailHeight)
.mask(RoundedRectangle(cornerRadius: 6))
}

View File

@@ -80,7 +80,7 @@ struct ChaptersView: View {
}
#if !os(tvOS)
private func chapterViews(for chaptersToShow: ArraySlice<Chapter>, opacity: Double = 1.0, clickable: Bool = true, scrollViewProxy: ScrollViewProxy? = nil) -> some View {
private func chapterViews(for chaptersToShow: ArraySlice<Chapter>, opacity: Double = 1.0, clickable: Bool = true, scrollViewProxy _: ScrollViewProxy? = nil) -> some View {
ForEach(Array(chaptersToShow.indices), id: \.self) { index in
let chapter = chaptersToShow[index]
ChapterView(chapter: chapter, chapterIndex: index, showThumbnail: showThumbnails)

View File

@@ -88,7 +88,7 @@ struct VideoDescription: View {
var formattedString: AttributedString {
var attrString = AttributedString(description)
let words = description.unicodeScalars.split(whereSeparator: separators.contains).map(String.init)
words.forEach { word in
for word in words {
if word.hasPrefix("https://") || word.hasPrefix("http://"), let url = URL(string: String(word)) {
if let range = attrString.range(of: word) {
attrString[range].link = url