Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
Experimental: Loading of messages starts earlier than on the hard end…
Browse files Browse the repository at this point in the history
… of the message list
  • Loading branch information
Flohack74 committed Mar 4, 2018
1 parent 8a05e49 commit 3424dcc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions telegram/app/qml/AccountMessageList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,15 @@ Rectangle {
header: Item{ width: 4; height: units.dp(4) }
footer: Item{ width: 4; height: units.dp(4) }

onAtYBeginningChanged: if( atYBeginning && contentHeight>height &&
currentDialog != telegramObject.nullDialog ) messages_model.loadMore()
// onAtYBeginningChanged: if( atYBeginning && contentHeight>height &&
// currentDialog != telegramObject.nullDialog )
onContentYChanged:
if (contentHeight>height && (contentY - originY) * (height / contentHeight) < 250)
{
console.log("Reached loading window: ", (contentY - originY) * (height / contentHeight) )
messages_model.loadMore()
}


section.property: "unreaded"
section.criteria: ViewSection.FullString
Expand Down

0 comments on commit 3424dcc

Please sign in to comment.