Set this._badge to null in WCF.User.Panel.Abstract.updateBadge on removal
authorMaximilian Mader <max@bastelstu.be>
Thu, 26 Feb 2015 23:23:26 +0000 (00:23 +0100)
committerMaximilian Mader <max@bastelstu.be>
Thu, 26 Feb 2015 23:23:26 +0000 (00:23 +0100)
When not explicitly set to `null` the variable will still contain a reference, thus a badge update will not create a new badge when it was removed earlier.

wcfsetup/install/files/js/WCF.User.js

index 211bd47e9e685783634c03b54a060a08b28290b8..58d1dfcf67d17ad9688a1674a9fe399cb26f0512 100644 (file)
@@ -390,6 +390,7 @@ WCF.User.Panel.Abstract = Class.extend({
                }
                else if (this._badge !== null) {
                        this._badge.remove();
+                       this._badge = null;
                }
                
                if (this._options.enableMarkAsRead) {
@@ -527,7 +528,7 @@ WCF.User.Panel.Notification = WCF.User.Panel.Abstract.extend({
                }
                
                this.updateBadge(count);
-       }       
+       }
 });
 
 /**