disable quite a few line length warnings
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
// swiftlint:disable line_length
|
||||
//
|
||||
// SnapshotHelper.swift
|
||||
// Example
|
||||
@ -32,7 +33,8 @@ func snapshot(_ name: String, waitForLoadingIndicator: Bool) {
|
||||
|
||||
/// - Parameters:
|
||||
/// - name: The name of the snapshot
|
||||
/// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait.
|
||||
/// - timeout: Amount of seconds to wait until the network loading indicator disappears.
|
||||
/// Pass `0` if you don't want to wait.
|
||||
func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) {
|
||||
Snapshot.snapshot(name, timeWaitingForIdle: timeout)
|
||||
}
|
||||
|
||||
@ -177,6 +177,7 @@ public struct ShareExtensionView: View {
|
||||
VStack(spacing: 15) {
|
||||
SearchBar(searchTerm: $labelsViewModel.labelSearchFilter)
|
||||
|
||||
// swiftlint:disable line_length
|
||||
ScrollView {
|
||||
LabelsMasonaryView(labels: labelsViewModel.labels.applySearchFilter(labelsViewModel.labelSearchFilter),
|
||||
selectedLabels: labelsViewModel.selectedLabels.applySearchFilter(labelsViewModel.labelSearchFilter),
|
||||
@ -199,6 +200,7 @@ public struct ShareExtensionView: View {
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.padding(10)
|
||||
}.background(Color.appButtonBackground)
|
||||
// swiftlint:enable line_length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,6 +143,7 @@ struct HighlightsListCard: View {
|
||||
HStack {
|
||||
Divider()
|
||||
.frame(width: 2)
|
||||
// swiftlint:disable:next line_length
|
||||
.overlay(highlightParams.createdBy != nil ? Color(red: 206 / 255.0, green: 239 / 255.0, blue: 159 / 255.0) : Color.appYellow48)
|
||||
.opacity(0.8)
|
||||
.padding(.top, 2)
|
||||
|
||||
@ -514,6 +514,7 @@ import Views
|
||||
}
|
||||
}
|
||||
}
|
||||
// swiftlint:disable:next line_length
|
||||
.alert("Are you sure you want to delete this item? All associated notes and highlights will be deleted.", isPresented: $confirmationShown) {
|
||||
Button("Delete Item", role: .destructive) {
|
||||
if let itemToRemove = itemToRemove {
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
}
|
||||
.frame(height: storedSize.height)
|
||||
.overlay(content: {
|
||||
// swiftlint:disable line_length
|
||||
HStack {
|
||||
let color: Color = .systemBackground
|
||||
|
||||
@ -47,6 +48,7 @@
|
||||
|
||||
LinearGradient(colors: [color, color.opacity(0.7), color.opacity(0.5), color.opacity(0.3)].reversed(), startPoint: .leading, endPoint: .trailing)
|
||||
.frame(width: 8)
|
||||
// swiftlint:enable line_length
|
||||
}
|
||||
})
|
||||
.disabled(true)
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
import SwiftUI
|
||||
import Views
|
||||
|
||||
// swiftlint:disable line_length
|
||||
struct TextToSpeechView: View {
|
||||
@EnvironmentObject var audioController: AudioController
|
||||
|
||||
|
||||
@ -62,8 +62,10 @@
|
||||
}
|
||||
.navigationTitle("Choose a Voice")
|
||||
.onAppear {
|
||||
// swiftlint:disable:next line_length
|
||||
viewModel.realisticVoicesToggle = (audioController.useUltraRealisticVoices && !audioController.ultraRealisticFeatureKey.isEmpty)
|
||||
}.onChange(of: viewModel.realisticVoicesToggle) { value in
|
||||
}
|
||||
.onChange(of: viewModel.realisticVoicesToggle) { value in
|
||||
if value, audioController.ultraRealisticFeatureKey.isEmpty {
|
||||
// User wants to sign up
|
||||
viewModel.waitingForRealisticVoices = true
|
||||
@ -94,6 +96,7 @@
|
||||
private var ultraRealisticVoices: some View {
|
||||
ForEach([VoiceCategory.enUS], id: \.self) { category in
|
||||
Section(category.rawValue) {
|
||||
// swiftlint:disable:next line_length
|
||||
ForEach(audioController.realisticVoiceList?.filter { $0.category == category } ?? [], id: \.key.self) { voice in
|
||||
voiceRow(for: voice)
|
||||
}
|
||||
|
||||
@ -54,6 +54,7 @@ struct HighlightViewer: PlatformViewRepresentable {
|
||||
}
|
||||
|
||||
private func loadContent(webView: WKWebView) {
|
||||
// swiftlint:disable line_length
|
||||
let themeKey = ThemeManager.currentThemeName
|
||||
let content = """
|
||||
<!DOCTYPE html>
|
||||
@ -73,6 +74,7 @@ struct HighlightViewer: PlatformViewRepresentable {
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
// swiftlint:enable line_length
|
||||
|
||||
webView.loadHTMLString(content, baseURL: ViewsPackage.resourceURL)
|
||||
}
|
||||
|
||||
@ -195,6 +195,7 @@ struct WebReaderContainerView: View {
|
||||
viewModel.downloadAudio(audioController: audioController, item: item)
|
||||
},
|
||||
label: {
|
||||
// swiftlint:disable:next line_length
|
||||
Label(viewModel.isDownloadingAudio ? "Downloading Audio" : "Download Audio", systemImage: "icloud.and.arrow.down")
|
||||
}
|
||||
)
|
||||
|
||||
@ -22,6 +22,7 @@ class SpeechPlayerItem: AVPlayerItem {
|
||||
|
||||
var observer: Any?
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
init(session: AudioController, prefetchQueue: OperationQueue, speechItem: SpeechItem, completed: @escaping () -> Void) {
|
||||
self.speechItem = speechItem
|
||||
self.session = session
|
||||
@ -120,6 +121,7 @@ class SpeechPlayerItem: AVPlayerItem {
|
||||
}
|
||||
|
||||
do {
|
||||
// swiftlint:disable:next line_length
|
||||
let speechData = try await SpeechSynthesizer.download(speechItem: speechItem, session: self.session ?? URLSession.shared)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
@ -173,6 +175,7 @@ class SpeechPlayerItem: AVPlayerItem {
|
||||
_ = requestsFulfilled.map { self.pendingRequests.remove($0) }
|
||||
}
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
func fillInContentInformationRequest(_ contentInformationRequest: AVAssetResourceLoadingContentInformationRequest?) {
|
||||
contentInformationRequest?.contentType = UTType.mp3.identifier
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@ public struct VoicePair {
|
||||
let category: VoiceCategory
|
||||
}
|
||||
|
||||
// swiftlint:disable line_length
|
||||
public enum Voices {
|
||||
public static func isUltraRealisticVoice(_ voiceKey: String) -> Bool {
|
||||
UltraPairs.contains(where: { voice in
|
||||
@ -77,7 +78,6 @@ public enum Voices {
|
||||
VoiceLanguage(key: "ta", name: "Tamil", defaultVoice: "ta-IN-PallaviNeural", categories: [.taIN, .taLK, .taMY, .taSG])
|
||||
]
|
||||
|
||||
// swiftlint:disable all
|
||||
public static let Pairs = [
|
||||
VoicePair(firstKey: "en-US-JennyNeural", secondKey: "en-US-BrandonNeural", firstName: "Jenny", secondName: "Brandon", language: "en-US", category: .enUS),
|
||||
VoicePair(firstKey: "en-US-CoraNeural", secondKey: "en-US-ChristopherNeural", firstName: "Cora", secondName: "Christopher", language: "en-US", category: .enUS),
|
||||
|
||||
@ -4,6 +4,7 @@ import Models
|
||||
import SwiftGraphQL
|
||||
|
||||
public extension DataService {
|
||||
// swiftlint:disable:next line_length
|
||||
func createRecommendationGroup(name: String, onlyAdminCanPost: Bool, onlyAdminCanSeeMembers: Bool) async throws -> InternalRecommendationGroup {
|
||||
enum MutationResult {
|
||||
case saved(recommendationGroup: InternalRecommendationGroup)
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import UIKit
|
||||
|
||||
public extension UIViewController {
|
||||
// swiftlint:disable line_length
|
||||
func embed(childViewController child: UIViewController, heightRatio: CGFloat? = nil) {
|
||||
addChild(child)
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import Foundation
|
||||
import StoreKit
|
||||
import SwiftUI
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
let tweetUrl = "https://twitter.com/intent/tweet?text=I%20recently%20started%20using%20@OmnivoreApp%20as%20a%20free,%20open-source%20read-it-later%20app.%20Check%20it%20out:%20https://omnivore.app"
|
||||
|
||||
public struct CommunityModal: View {
|
||||
@ -80,6 +81,7 @@ public struct CommunityModal: View {
|
||||
var buttonLinks: some View {
|
||||
VStack(spacing: 15) {
|
||||
Button(action: {
|
||||
// swiftlint:disable:next line_length
|
||||
if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
|
||||
SKStoreReviewController.requestReview(in: scene)
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ public struct TextChip: View {
|
||||
self.padded = false
|
||||
}
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
public init?(feedItemLabel: LinkedItemLabel, negated: Bool = false, checked: Bool = false, padded: Bool = false, onTap: ((TextChip) -> Void)?) {
|
||||
guard let color = Color(hex: feedItemLabel.color ?? "") else {
|
||||
return nil
|
||||
|
||||
@ -48,6 +48,7 @@ private let logger = Logger(subsystem: "app.omnivore", category: "app-delegate")
|
||||
Services.registerBackgroundFetch()
|
||||
configureFirebase()
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
NotificationCenter.default.addObserver(forName: Notification.Name("ReconfigurePushNotifications"), object: nil, queue: OperationQueue.main) { _ in
|
||||
if UserDefaults.standard.bool(forKey: UserDefaultKey.notificationsEnabled.rawValue) {
|
||||
self.registerForNotifications()
|
||||
|
||||
Reference in New Issue
Block a user