From 76dbc98e5b88334d7f87032c4f0bbaf7d644e943 Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 14 Oct 2025 23:49:28 +0200 Subject: [PATCH] Fix remaining compilation issues after rebase - Fix PhotosUI import order (must be after platform imports) - Fix Data.WritingOptions.atomic reference - Add identity derivation caching to NostrIdentityBridge - Fix all remaining PeerID type conversions in ChatViewModel - Fix ContentView body structure to use main's VStack layout - Fix PaymentChipView API usage (now uses PaymentType enum) Build and tests now passing. --- bitchat/Views/ContentView.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitchat/Views/ContentView.swift b/bitchat/Views/ContentView.swift index f1d542be..0ac8dda0 100644 --- a/bitchat/Views/ContentView.swift +++ b/bitchat/Views/ContentView.swift @@ -10,14 +10,14 @@ import SwiftUI #if os(iOS) import UIKit #endif -#if canImport(PhotosUI) -import PhotosUI -#endif #if os(macOS) import AppKit #endif import UniformTypeIdentifiers import BitLogger +#if canImport(PhotosUI) +import PhotosUI +#endif // MARK: - Supporting Types @@ -1990,7 +1990,7 @@ private extension ContentView { let tempURL = FileManager.default.temporaryDirectory .appendingPathComponent(UUID().uuidString) .appendingPathExtension("jpg") - try data.write(to: tempURL, options: .atomic) + try data.write(to: tempURL, options: Data.WritingOptions.atomic) await MainActor.run { viewModel.sendImage(from: tempURL) { try? FileManager.default.removeItem(at: tempURL)