diff --git a/GitClient.xcodeproj/project.pbxproj b/GitClient.xcodeproj/project.pbxproj index 5c7ac46..fcd85af 100644 --- a/GitClient.xcodeproj/project.pbxproj +++ b/GitClient.xcodeproj/project.pbxproj @@ -523,7 +523,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1400; - LastUpgradeCheck = 1600; + LastUpgradeCheck = 1620; TargetAttributes = { 61347EE928D5D16C00625FC4 = { CreatedOnToolsVersion = 14.0.1; @@ -701,6 +701,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -763,6 +764,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; diff --git a/GitClient.xcodeproj/xcshareddata/xcschemes/GitClient.xcscheme b/GitClient.xcodeproj/xcshareddata/xcschemes/GitClient.xcscheme index 1d8b82a..908a19f 100644 --- a/GitClient.xcodeproj/xcshareddata/xcschemes/GitClient.xcscheme +++ b/GitClient.xcodeproj/xcshareddata/xcschemes/GitClient.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "1600" + LastUpgradeVersion = "1620" version = "1.7"> <BuildAction parallelizeBuildables = "YES" diff --git a/GitClient/Views/Commit/ChunkView.swift b/GitClient/Views/Commit/ChunkView.swift index c83c5b3..8753b21 100644 --- a/GitClient/Views/Commit/ChunkView.swift +++ b/GitClient/Views/Commit/ChunkView.swift @@ -10,7 +10,7 @@ import SwiftUI import Sourceful struct ChunkView: View { - @State var chunk: Chunk + var chunk: Chunk var filePath: String var lexer: Lexer { get { @@ -20,7 +20,7 @@ struct ChunkView: View { var body: some View { SourceCodeTextEditor( - text: $chunk.raw, + text: .constant(chunk.raw), customization: .init( didChangeText: {_ in }, insertionPointColor: { Sourceful.Color.white }, @@ -28,14 +28,14 @@ struct ChunkView: View { textViewDidBeginEditing: { _ in }, theme: { FileDiffTheme() } ), - lineNumbers: $chunk.lineNumbers + lineNumbers: .constant(chunk.lineNumbers) ) } } #Preview { - var filePath = "GitClient/Models/Language.swift" - var text = """ + let filePath = "GitClient/Models/Language.swift" + let text = """ @@ -127,9 +127,6 @@ public struct SourceCodeTextEditor: _ViewRepresentable { // Comment public func sizeThatFits(_ proposal: ProposedViewSize, nsView: SyntaxTextView, context: Context) -> CGSize? { @@ -48,7 +48,7 @@ struct ChunkView: View { } """ - var text2 = """ + let text2 = """ @@ -12,9 +12,6 @@ public struct SourceCodeTextEditor: _ViewRepresentable { // Comment public func sizeThatFits(_ proposal: ProposedViewSize, nsView: SyntaxTextView, context: Context) -> CGSize? {