Fossil SCM
Removed an accidental extraneous animation on every chat message sent.
Commit
0fe5b6cb7e2c44ca436dc390934ff5a5292dce2192febd900ac916bbe725b6ed
Parent
9e5acae7d5933b0…
1 file changed
+3
+3
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -444,10 +444,13 @@ | ||
| 444 | 444 | Expects e to be one of the elements in this.e.views. |
| 445 | 445 | The 'hidden' class is removed from e and added to |
| 446 | 446 | all other elements in that list. Returns e. |
| 447 | 447 | */ |
| 448 | 448 | setCurrentView: function(e){ |
| 449 | + if(e===this.e.currentView){ | |
| 450 | + return e; | |
| 451 | + } | |
| 449 | 452 | this.e.views.forEach(function(E){ |
| 450 | 453 | if(e!==E) D.addClass(E,'hidden'); |
| 451 | 454 | }); |
| 452 | 455 | this.e.currentView = D.removeClass(e,'hidden'); |
| 453 | 456 | this.animate(this.e.currentView, 'anim-fade-in-fast'); |
| 454 | 457 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -444,10 +444,13 @@ | |
| 444 | Expects e to be one of the elements in this.e.views. |
| 445 | The 'hidden' class is removed from e and added to |
| 446 | all other elements in that list. Returns e. |
| 447 | */ |
| 448 | setCurrentView: function(e){ |
| 449 | this.e.views.forEach(function(E){ |
| 450 | if(e!==E) D.addClass(E,'hidden'); |
| 451 | }); |
| 452 | this.e.currentView = D.removeClass(e,'hidden'); |
| 453 | this.animate(this.e.currentView, 'anim-fade-in-fast'); |
| 454 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -444,10 +444,13 @@ | |
| 444 | Expects e to be one of the elements in this.e.views. |
| 445 | The 'hidden' class is removed from e and added to |
| 446 | all other elements in that list. Returns e. |
| 447 | */ |
| 448 | setCurrentView: function(e){ |
| 449 | if(e===this.e.currentView){ |
| 450 | return e; |
| 451 | } |
| 452 | this.e.views.forEach(function(E){ |
| 453 | if(e!==E) D.addClass(E,'hidden'); |
| 454 | }); |
| 455 | this.e.currentView = D.removeClass(e,'hidden'); |
| 456 | this.animate(this.e.currentView, 'anim-fade-in-fast'); |
| 457 |