forked from farhoodlabs/paperclip
Fix inbox ordering: self-touched issues no longer sink to bottom (#2144)
issueLastActivityTimestamp() returned 0 for issues where the user was the last to touch them (myLastTouchAt >= updatedAt) and no external comment existed. This pushed those items to the bottom of the inbox list regardless of how recently they were updated. Now falls back to updatedAt instead, so recently updated items sort to the top of the Recent tab as expected. Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
+1
-5
@@ -148,11 +148,7 @@ export function issueLastActivityTimestamp(issue: Issue): number {
|
||||
const lastExternalCommentAt = normalizeTimestamp(issue.lastExternalCommentAt);
|
||||
if (lastExternalCommentAt > 0) return lastExternalCommentAt;
|
||||
|
||||
const updatedAt = normalizeTimestamp(issue.updatedAt);
|
||||
const myLastTouchAt = normalizeTimestamp(issue.myLastTouchAt);
|
||||
if (myLastTouchAt > 0 && updatedAt <= myLastTouchAt) return 0;
|
||||
|
||||
return updatedAt;
|
||||
return normalizeTimestamp(issue.updatedAt);
|
||||
}
|
||||
|
||||
export function sortIssuesByMostRecentActivity(a: Issue, b: Issue): number {
|
||||
|
||||
Reference in New Issue
Block a user