[codex] Refactor BLE transport event handling (#1266)

* Refactor BLE transport event handling

* Make image output paths unique

* Keep queued Nostr read receipts alive

* Allow self-authored RSR ingress replies

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2026-05-31 13:58:27 +02:00
committed by GitHub
co-authored by jack
parent 3be8fbf1c4
commit ab0da61533
19 changed files with 575 additions and 152 deletions
+6 -1
View File
@@ -93,7 +93,7 @@ import UniformTypeIdentifiers
/// Manages the application state and business logic for BitChat.
/// Acts as the primary coordinator between UI components and backend services,
/// implementing the BitchatDelegate protocol to handle network events.
final class ChatViewModel: ObservableObject, BitchatDelegate, CommandContextProvider, GeohashParticipantContext, MessageFormattingContext {
final class ChatViewModel: ObservableObject, BitchatDelegate, TransportEventDelegate, CommandContextProvider, GeohashParticipantContext, MessageFormattingContext {
// Use MessageFormattingEngine.Patterns for regex matching (shared, precompiled)
typealias Patterns = MessageFormattingEngine.Patterns
@@ -1298,6 +1298,11 @@ final class ChatViewModel: ObservableObject, BitchatDelegate, CommandContextProv
}
// MARK: - Message Reception
@MainActor
func didReceiveTransportEvent(_ event: TransportEvent) {
receiveTransportEvent(event)
}
func didReceiveMessage(_ message: BitchatMessage) {
transportEventCoordinator.didReceiveMessage(message)