Don't sort if already sorted
// FREEBIE
This commit is contained in:
parent
2cea499736
commit
3a50a892dc
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@
|
||||||
var $el = this.$('.' + conversation.cid);
|
var $el = this.$('.' + conversation.cid);
|
||||||
if ($el && $el.length > 0) {
|
if ($el && $el.length > 0) {
|
||||||
var index = getInboxCollection().indexOf(conversation);
|
var index = getInboxCollection().indexOf(conversation);
|
||||||
|
if (index === this.$el.index($el)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
this.$el.prepend($el);
|
this.$el.prepend($el);
|
||||||
} else if (index === this.collection.length - 1) {
|
} else if (index === this.collection.length - 1) {
|
||||||
|
|
Loading…
Reference in a new issue