From cc9a5c3be7fb8c5935dbfa49b7926219674fa705 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Tue, 1 May 2012 16:15:32 +1000 Subject: [PATCH] misc/dashboard/codereview: preserve CL ordering. R=r CC=golang-dev https://golang.org/cl/6136056 --- misc/dashboard/codereview/dashboard/front.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/dashboard/codereview/dashboard/front.go b/misc/dashboard/codereview/dashboard/front.go index 9eb36f3143..475a663516 100644 --- a/misc/dashboard/codereview/dashboard/front.go +++ b/misc/dashboard/codereview/dashboard/front.go @@ -78,7 +78,8 @@ func handleFront(w http.ResponseWriter, r *http.Request) { for i := len(tbl.CLs) - 1; i >= 0; i-- { cl := tbl.CLs[i] if cl.Author == currentPerson || cl.Reviewer == currentPerson { - tbl.CLs[i] = tbl.CLs[len(tbl.CLs)-1] + // Preserve order. + copy(tbl.CLs[i:], tbl.CLs[i+1:]) tbl.CLs = tbl.CLs[:len(tbl.CLs)-1] } } -- 2.48.1