forked from cory/tildefriends
Support selecting a thread and showing related messages (by a rather brute force search). Sort child messages in the reverse order of top level messages, because that's how we roll.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3754 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -44,7 +44,7 @@ function processMessages() {
|
||||
for (let message of g_data.messages) {
|
||||
if (root == message.id) {
|
||||
message.children.push(new_message);
|
||||
message.children.sort((x, y) => y.timestamp - x.timestamp);
|
||||
message.children.sort((x, y) => x.timestamp - y.timestamp);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ function processMessages() {
|
||||
for (let message of g_data.messages) {
|
||||
if (JSON.parse(message.content).root == new_message.id) {
|
||||
new_message.children.push(message);
|
||||
new_message.children.sort((x, y) => y.timestamp - x.timestamp);
|
||||
new_message.children.sort((x, y) => x.timestamp - y.timestamp);
|
||||
removed[message.id] = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user