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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user