Closed rrbrambley closed 10 years ago
Dates are failing to evaluate as equal. It seems as though using NSNumber timeIntervalSince1970 could work, but that could look messy.
(lldb) p [(NSDate *)[channelMessages.allKeys objectAtIndex:0] timeIntervalSince1970] (double) $2 = 1394469366.168542 (lldb) p [(NSDate *)[channelMessages.allKeys objectAtIndex:0] timeIntervalSince1970] == messagePlus.displayDate.timeIntervalSince1970 (bool) $3 = true (lldb) p [(NSDate *)[channelMessages.allKeys objectAtIndex:0] isEqualToDate:messagePlus.displayDate] (char) $4 = '\0' (lldb) p [(NSDate *)[channelMessages.allKeys objectAtIndex:0] isEqual:messagePlus.displayDate] (char) $6 = '\0'
This evaluates to YES:
[[NSNumber numberWithDouble:[(NSDate *)[channelMessages.allKeys objectAtIndex:0] timeIntervalSince1970]] isEqual:[NSNumber numberWithDouble:messagePlus.displayDate.timeIntervalSince1970]]
Is it possible to just use some other dictionary key? Sigh.
Go back to using message IDs?
Dates are failing to evaluate as equal. It seems as though using NSNumber timeIntervalSince1970 could work, but that could look messy.
This evaluates to YES:
Is it possible to just use some other dictionary key? Sigh.