mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 16:08:34 +01:00
Fix sorting of the last element
// FREEBIE
This commit is contained in:
@@ -13,10 +13,12 @@
|
||||
var $el = this.$('.' + conversation.cid);
|
||||
if ($el && $el.length > 0) {
|
||||
var index = getInboxCollection().indexOf(conversation);
|
||||
if (index > 0) {
|
||||
$el.insertBefore(this.$('.conversation-list-item')[index+1]);
|
||||
} else {
|
||||
if (index === 0) {
|
||||
this.$el.prepend($el);
|
||||
} else if (index === this.collection.length - 1) {
|
||||
this.$el.append($el);
|
||||
} else {
|
||||
$el.insertBefore(this.$('.conversation-list-item')[index+1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user