Also, this fixes thread.lastMessage which was broken in #56 by changing thread.messages back into an array like observable.
The previous PR had swapped out a concat (array like/collection with indexOf, etc) with a computed (flat object). This was a breaking API change, and it also broke the system for avoiding re-rendering the entire thread in patchwork whenever a new message was added.
This PR fixes this by switching back to concat, and then moving the sort logic into the reply sorting. Haven't tested on a thread that is out of order yet. I'll leave that as an exercise for you @mixmix (I have to catch a flight soon!)
Also, this fixes
thread.lastMessage
which was broken in #56 by changingthread.messages
back into an array like observable.The previous PR had swapped out a concat (array like/collection with indexOf, etc) with a computed (flat object). This was a breaking API change, and it also broke the system for avoiding re-rendering the entire thread in patchwork whenever a new message was added.
This PR fixes this by switching back to concat, and then moving the sort logic into the reply sorting. Haven't tested on a thread that is out of order yet. I'll leave that as an exercise for you @mixmix (I have to catch a flight soon!)