mirror of
https://github.com/yattee/yattee.git
synced 2025-11-12 21:28:42 +00:00
Fix all SwiftLint violations across codebase
Resolves 130+ violations including deployment target checks, code style issues, and formatting inconsistencies. Adds SwiftLint disable comments for compiler-required availability checks while maintaining deployment target compliance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import SwiftUI
|
||||
struct CommentView: View {
|
||||
let comment: Comment
|
||||
@Binding var repliesID: Comment.ID?
|
||||
var availableWidth: CGFloat
|
||||
var availableWidth: Double
|
||||
|
||||
@State private var subscribed = false
|
||||
|
||||
@@ -228,27 +228,20 @@ struct CommentView: View {
|
||||
private var commentText: some View {
|
||||
Group {
|
||||
let rawText = comment.text
|
||||
if #available(iOS 15.0, macOS 12.0, *) {
|
||||
#if os(iOS)
|
||||
ActiveLabelCommentRepresentable(
|
||||
text: rawText,
|
||||
availableWidth: availableWidth
|
||||
)
|
||||
#elseif os(macOS)
|
||||
Text(rawText)
|
||||
.font(.system(size: 14))
|
||||
.lineSpacing(3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.textSelection(.enabled)
|
||||
#else
|
||||
Text(comment.text)
|
||||
#endif
|
||||
} else {
|
||||
#if os(iOS)
|
||||
ActiveLabelCommentRepresentable(
|
||||
text: rawText,
|
||||
availableWidth: availableWidth
|
||||
)
|
||||
#elseif os(macOS)
|
||||
Text(rawText)
|
||||
.font(.system(size: 15))
|
||||
.font(.system(size: 14))
|
||||
.lineSpacing(3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.textSelection(.enabled)
|
||||
#else
|
||||
Text(comment.text)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +256,7 @@ struct CommentView: View {
|
||||
#if os(iOS)
|
||||
struct ActiveLabelCommentRepresentable: UIViewRepresentable {
|
||||
var text: String
|
||||
var availableWidth: CGFloat
|
||||
var availableWidth: Double
|
||||
|
||||
@State private var label = ActiveLabel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user