Fix iOS build: use isUser property instead of enum comparison (#23)

Swift cannot directly compare enums with associated values using ==.
Use the existing isUser computed property which uses pattern matching.
This commit is contained in:
Thomas Marchand
2026-01-03 17:18:10 +00:00
committed by GitHub
parent 7f00b9b25c
commit 69fe11f5b1

View File

@@ -1094,7 +1094,7 @@ struct ControlView: View {
// Check if there's a pending temp message with matching content (SSE arrived before API response)
// We verify content to avoid mismatching with messages from other sessions/devices
if let tempIndex = messages.firstIndex(where: {
$0.type == .user && $0.id.hasPrefix("temp-") && $0.content == content
$0.isUser && $0.id.hasPrefix("temp-") && $0.content == content
}) {
// Replace temp ID with server ID, preserving original timestamp
let originalTimestamp = messages[tempIndex].timestamp