Fix an issue caused by viewpoint restoring.
This commit is contained in:
parent
99bf32bf91
commit
0c1a90bf5d
|
@ -9,13 +9,8 @@ RoomPanelForm {
|
||||||
if (currentRoom)
|
if (currentRoom)
|
||||||
{
|
{
|
||||||
var lastScrollPosition = sortedMessageEventModel.mapFromSource(currentRoom.savedTopVisibleIndex())
|
var lastScrollPosition = sortedMessageEventModel.mapFromSource(currentRoom.savedTopVisibleIndex())
|
||||||
if (lastScrollPosition === 0)
|
|
||||||
messageListView.positionViewAtEnd()
|
|
||||||
else
|
|
||||||
{
|
|
||||||
console.log("Scrolling to position", lastScrollPosition)
|
console.log("Scrolling to position", lastScrollPosition)
|
||||||
messageListView.currentIndex = lastScrollPosition
|
messageListView.currentIndex = lastScrollPosition
|
||||||
}
|
|
||||||
if (messageListView.contentY < messageListView.originY + 10 || currentRoom.timelineSize === 0)
|
if (messageListView.contentY < messageListView.originY + 10 || currentRoom.timelineSize === 0)
|
||||||
currentRoom.getPreviousContent(100)
|
currentRoom.getPreviousContent(100)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue