Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix issue sorting and timestamps
Rūdolfs Ošiņš committed 1 year ago
commit 319b1502c634ce9ef2d8dd23d2ac7d9d0fa2e893
parent 1f9f6505ab57c2e12a610a82a5cbeb4538cbac27
2 files changed +2 -5
modified src/components/Thread.svelte
@@ -115,7 +115,7 @@
              author={reply.author}
              caption="replied"
              reactions={reply.reactions}
-
              timestamp={reply.edits.slice(-1)[0].timestamp}
+
              timestamp={reply.edits[0].timestamp}
              body={reply.edits.slice(-1)[0].body}
              editComment={editComment &&
                canEditComment(reply.author.did) &&
modified src/views/repo/Issue.svelte
@@ -69,10 +69,7 @@
        root: thread,
        replies: issue.discussion
          .filter(comment => comment.replyTo === thread.id)
-
          .sort(
-
            (a, b) =>
-
              a.edits.slice(-1)[0].timestamp - b.edits.slice(-1)[0].timestamp,
-
          ),
+
          .sort((a, b) => a.edits[0].timestamp - b.edits[0].timestamp),
      };
    }, []);