Ticket #7296: Don't show thread graphics when in subject sort
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 21 Apr 2009 15:43:45 +0000 (09:43 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 21 Apr 2009 15:43:45 +0000 (09:43 -0600)
imp/js/src/DimpBase.js

index bdc33c7..fd43705 100644 (file)
@@ -438,21 +438,24 @@ var DimpBase = {
             }.bind(this),
             onContent: function(row) {
                 var bg, re, u,
-                    thread = this.viewport.getMetaData('thread') || $H();
+                    thread = this.viewport.getMetaData('thread') || $H(),
+                    tsort = (this.viewport.getMetaData('sortby') == DIMP.conf.sortthread);
 
                 row.subjectdata = row.status = '';
                 row.subjecttitle = row.subject;
 
                 // Add thread graphics
-                u = thread.get(row.imapuid);
-                if (u) {
-                    $R(0, u.length, true).each(function(i) {
-                        var c = u.charAt(i);
-                        if (!this.tcache[c]) {
-                            this.tcache[c] = '<span class="threadImg threadImg' + c + '"></span>';
-                        }
-                        row.subjectdata += this.tcache[c];
-                    }, this);
+                if (tsort) {
+                    u = thread.get(row.imapuid);
+                    if (u) {
+                        $R(0, u.length, true).each(function(i) {
+                            var c = u.charAt(i);
+                            if (!this.tcache[c]) {
+                                this.tcache[c] = '<span class="threadImg threadImg' + c + '"></span>';
+                            }
+                            row.subjectdata += this.tcache[c];
+                        }, this);
+                    }
                 }
 
                 /* Generate the status flags. */