mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 03:45:21 +00:00
Fix voice note fragment handling and narrow macOS sidebar
- Fix fragment processing bug where fragments were logged but not handled - Remove redundant 'Processing fragment directly' check that prevented handling - Make macOS sidebar narrower (300px max or 40% of width, whichever is smaller) - iOS sidebar remains at 70% width for better touch interaction
This commit is contained in:
@@ -997,13 +997,7 @@ extension BluetoothMeshService: CBPeripheralDelegate {
|
||||
let packetSenderID = String(data: packet.senderID.trimmingNullBytes(), encoding: .utf8) ?? "unknown"
|
||||
print("[PERIPHERAL] Received data from localPeerID: \(localPeerID), packetSenderID: \(packetSenderID), packet type: \(packet.type)")
|
||||
|
||||
// Handle fragments directly if it's a fragment type
|
||||
if packet.type == MessageType.fragmentStart.rawValue ||
|
||||
packet.type == MessageType.fragmentContinue.rawValue ||
|
||||
packet.type == MessageType.fragmentEnd.rawValue {
|
||||
print("[PERIPHERAL] Processing fragment directly")
|
||||
}
|
||||
|
||||
// Always handle received packets
|
||||
handleReceivedPacket(packet, from: packetSenderID, peripheral: peripheral)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user