summaryrefslogtreecommitdiff
path: root/lib/threadbuilder.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/threadbuilder.go')
-rw-r--r--lib/threadbuilder.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/threadbuilder.go b/lib/threadbuilder.go
index 334a846..a1954cb 100644
--- a/lib/threadbuilder.go
+++ b/lib/threadbuilder.go
@@ -145,16 +145,12 @@ func (builder *ThreadBuilder) sortThreads(threads []*types.Thread, orderedUids [
// RebuildUids rebuilds the uids from the given slice of threads
func (builder *ThreadBuilder) RebuildUids(threads []*types.Thread) {
uids := make([]uint32, 0, len(threads))
- for i := len(threads) - 1; i >= 0; i-- {
+ for i := 0; i < len(threads); i++ {
threads[i].Walk(func(t *types.Thread, level int, currentErr error) error {
uids = append(uids, t.Uid)
return nil
})
}
- // copy in reverse as msgList displays backwards
- for i, j := 0, len(uids)-1; i < j; i, j = i+1, j-1 {
- uids[i], uids[j] = uids[j], uids[i]
- }
builder.threadedUids = uids
}