mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Auto-scroll to selected conversation when reordering them (#2498)
When conversations are reordered (last message time has changed), this commit leads to scrolling the shortest distance to the conversation.
This commit is contained in:
parent
e30b34f424
commit
6a611cbecf
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,12 @@
|
|||
var target = this.$('.' + targetConversation.cid);
|
||||
$el.insertAfter(target);
|
||||
}
|
||||
|
||||
if ($('.selected').length) {
|
||||
$('.selected')[0].scrollIntoView({
|
||||
block: 'nearest',
|
||||
});
|
||||
}
|
||||
},
|
||||
removeItem: function(conversation) {
|
||||
var $el = this.$('.' + conversation.cid);
|
||||
|
|
Loading…
Reference in a new issue