mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
Inline comment cleanup: drop legacy 'removed' breadcrumbs across protocols, services, view model, and views
This commit is contained in:
@@ -173,7 +173,7 @@ struct PendingActions {
|
||||
var setPetname: String?
|
||||
}
|
||||
|
||||
// (PrivacySettings, ConflictResolution, PeerUIState, ConnectionQuality removed; unused.)
|
||||
//
|
||||
|
||||
// MARK: - Migration Support
|
||||
// Removed LegacyFavorite - no longer needed
|
||||
//
|
||||
|
||||
@@ -89,4 +89,4 @@ struct BitchatPeer: Identifiable, Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
// (Legacy PeerManager removed; superseded by UnifiedPeerService.)
|
||||
//
|
||||
|
||||
@@ -416,7 +416,7 @@ struct NostrProtocol {
|
||||
|
||||
// Log with explicit UTC and local time for debugging
|
||||
let formatter = DateFormatter()
|
||||
// Removed unnecessary date formatting operations
|
||||
//
|
||||
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
||||
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
||||
|
||||
|
||||
@@ -181,8 +181,7 @@ enum LazyHandshakeState {
|
||||
case failed(Error) // Handshake failed
|
||||
}
|
||||
|
||||
// MARK: - Special Recipients (removed)
|
||||
// Previously defined broadcast identifiers were unused; removed for simplicity.
|
||||
//
|
||||
|
||||
// MARK: - Core Protocol Structures
|
||||
|
||||
@@ -268,8 +267,7 @@ struct BitchatPacket: Codable {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Delivery Acknowledgments (removed)
|
||||
// Legacy DeliveryAck structures are no longer used; delivery status flows via Noise payloads.
|
||||
//
|
||||
|
||||
// MARK: - Read Receipts
|
||||
|
||||
@@ -361,7 +359,7 @@ struct ReadReceipt: Codable {
|
||||
}
|
||||
|
||||
|
||||
// PeerIdentityBinding removed (unused).
|
||||
//
|
||||
|
||||
|
||||
// MARK: - Delivery Status
|
||||
|
||||
@@ -730,7 +730,7 @@ final class BLEService: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// Removed unused getPeers(): use getPeerNicknames() from Transport
|
||||
//
|
||||
|
||||
// MARK: - Private Message Handling
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class CommandProcessor {
|
||||
case "/unfav":
|
||||
if inGeoPublic || inGeoDM { return .error(message: "favorites are only for mesh peers in #mesh") }
|
||||
return handleFavorite(args, add: false)
|
||||
// /help removed
|
||||
//
|
||||
case "/help", "/h":
|
||||
return .error(message: "unknown command: \(cmd)")
|
||||
default:
|
||||
|
||||
@@ -297,7 +297,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
// Missing properties that were removed during refactoring
|
||||
//
|
||||
private var peerIDToPublicKeyFingerprint: [String: String] = [:]
|
||||
private var selectedPrivateChatFingerprint: String? = nil
|
||||
// Map stable short peer IDs (16-hex) to full Noise public key hex (64-hex) for session continuity
|
||||
@@ -1561,7 +1561,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
// Presence announcement removed; we will tag actual chat events instead
|
||||
//
|
||||
}
|
||||
|
||||
// MARK: - Geohash Participants
|
||||
@@ -1714,7 +1714,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
let toAdd = desired.subtracting(current)
|
||||
let toRemove = current.subtracting(desired)
|
||||
|
||||
// Unsubscribe removed
|
||||
//
|
||||
for (subID, gh) in geoSamplingSubs where toRemove.contains(gh) {
|
||||
NostrRelayManager.shared.unsubscribe(id: subID)
|
||||
geoSamplingSubs.removeValue(forKey: subID)
|
||||
@@ -3617,7 +3617,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
return unifiedPeerService.getFingerprint(for: peerID)
|
||||
}
|
||||
|
||||
// (legacy getFingerprint_old removed; UnifiedPeerService is the source of truth)
|
||||
//
|
||||
|
||||
|
||||
// Helper to resolve nickname for a peer ID through various sources
|
||||
@@ -4016,7 +4016,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
messageRouter.flushOutbox(for: peerID)
|
||||
}
|
||||
|
||||
// Connection messages removed to reduce chat noise
|
||||
//
|
||||
}
|
||||
|
||||
func didDisconnectFromPeer(_ peerID: String) {
|
||||
@@ -4083,7 +4083,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
// Disconnection messages removed to reduce chat noise
|
||||
//
|
||||
}
|
||||
|
||||
func didUpdatePeerList(_ peers: [String]) {
|
||||
@@ -4396,7 +4396,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
|
||||
// MARK: - Simplified Nostr Integration (Inlined from MessageRouter)
|
||||
|
||||
// Removed inlined Nostr send helpers in favor of MessageRouter
|
||||
//
|
||||
|
||||
@MainActor
|
||||
private func setupNostrMessageHandling() {
|
||||
@@ -4727,7 +4727,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
|
||||
return Data(base64Encoded: str)
|
||||
}
|
||||
|
||||
// Removed local TLV decoder; using PrivateMessagePacket.decode from Protocols
|
||||
//
|
||||
|
||||
@MainActor
|
||||
private func handleFavoriteNotificationFromMesh(_ content: String, from peerID: String, senderNickname: String) {
|
||||
|
||||
@@ -13,9 +13,9 @@ import UIKit
|
||||
|
||||
// MARK: - Supporting Types
|
||||
|
||||
// (PeerDisplayData removed; unused.)
|
||||
//
|
||||
|
||||
// (Link previews removed; URLs are now clickable inline)
|
||||
//
|
||||
|
||||
// MARK: - Main Content View
|
||||
|
||||
@@ -1372,7 +1372,7 @@ private struct PaymentChipView: View {
|
||||
}
|
||||
}
|
||||
|
||||
// (MessageContentView removed; unused.)
|
||||
//
|
||||
|
||||
// Delivery status indicator view
|
||||
struct DeliveryStatusView: View {
|
||||
|
||||
Reference in New Issue
Block a user