<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,7 +7,7 @@ Transmission.Torrent = (function() {
   var getFiles = function() { return this.files; };
   
   var updateAttributes = function(new_attributes) {
-    var new_attribute_value;
+    var new_attribute_value, callbacks = [];
     
     for (var attribute in new_attributes) {
       new_attribute_value = new_attributes[attribute];
@@ -15,11 +15,15 @@ Transmission.Torrent = (function() {
         this.attributes[attribute] = new_attribute_value;
         if (this.attribute_callbacks[attribute]) {
           this.attribute_callbacks[attribute].each(function(callback) {
-            callback();
+            if (!callbacks.include(callback)) {
+              callbacks.push(callback);
+            }
           });
         }
       }
     }
+    
+    callbacks.each(function(callback) { callback(); });
   };
   
   var getAttribute = function(attribute) {</diff>
      <filename>src/models/torrent.js</filename>
    </modified>
    <modified>
      <diff>@@ -54,10 +54,18 @@ function() { return {
     torrent.addAttributesEventListener([ 'haveUnchecked', 'hashString' ], function() {
       attribute_update_count++;
     });
+    
     torrent.updateAttributes({ hashString: 'b126e1ea1b49c79613f779ac0f36a9714e823fcb' });
     this.assertEqual(1, attribute_update_count);
+    
     torrent.updateAttributes({ haveUnchecked: 10 });
     this.assertEqual(2, attribute_update_count);
+    
+    torrent.updateAttributes({
+      hashString: 'b126e1ea1b49c79613f779ac0f36a9714e823fcc',
+      haveUnchecked: 11
+    });
+    this.assertEqual(3, attribute_update_count);
   }
   
 }; }</diff>
      <filename>test/unit/models/torrent_test.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0dd4b4885496bc1238e2cb0e186b0adc51b029b0</id>
    </parent>
  </parents>
  <author>
    <name>Duncan Beevers</name>
    <email>duncanbeevers@gmail.com</email>
  </author>
  <url>http://github.com/duncanbeevers/transmission-web-ui/commit/ac2c854c26d22764ca03752957f751611e403604</url>
  <id>ac2c854c26d22764ca03752957f751611e403604</id>
  <committed-date>2009-06-21T20:49:29-07:00</committed-date>
  <authored-date>2009-06-21T20:49:29-07:00</authored-date>
  <message>Invoke attribute callbacks only once per Torrent#updateAttributes</message>
  <tree>8fd7a56643974f98dd6c8efee3450c99a55aed53</tree>
  <committer>
    <name>Duncan Beevers</name>
    <email>duncanbeevers@gmail.com</email>
  </committer>
</commit>
