Repositories

Omar Jarjur <ojarjur@google.com>
960eff Submitting review 39155d21212b
Omar Jarjur committed at 2016-01-04 18:20:26

Fixed updateThreadsStatus to modify original thread instances, rather than modifying copies This is a proposed fix to #22

updateThreadsStatus was not actually updating the CommentThread instances, but updating copies thereof.

Modified review/review.go

@@ -82,7 +82,8 @@ func updateThreadsStatus(threads []CommentThread) *bool {
sort.Sort(byTimestamp(threads))
noUnresolved := true
var result *bool
for _, thread := range threads {
for i := range threads {
thread := &threads[i]
thread.updateResolvedStatus()
if thread.Resolved != nil {
noUnresolved = noUnresolved && *thread.Resolved