Fix critical room functionality issues

- Fix room field not being copied when creating messageWithPeerID in BluetoothMeshService
- This was causing all room messages to appear in main chat
- Fix room member tracking by ensuring senderPeerID is included
- Change room color from orange to blue to differentiate from private messages
- Clean up room members when peers disconnect to fix member count
- Add debug logging to track room field through message flow
This commit is contained in:
jack
2025-07-05 19:35:37 +02:00
parent 4051cda7e4
commit bf4a572299
3 changed files with 21 additions and 4 deletions
+2 -2
View File
@@ -215,7 +215,7 @@ struct ContentView: View {
}) {
Text("\(currentRoom) (\(memberCount))")
.font(.system(size: 18, weight: .medium, design: .monospaced))
.foregroundColor(Color.orange)
.foregroundColor(Color.blue)
}
.buttonStyle(.plain)
@@ -511,7 +511,7 @@ struct ContentView: View {
HStack {
Text(room)
.font(.system(size: 14, design: .monospaced))
.foregroundColor(viewModel.currentRoom == room ? Color.orange : textColor)
.foregroundColor(viewModel.currentRoom == room ? Color.blue : textColor)
Spacer()