Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
92d076ff
Commit
92d076ff
authored
Feb 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/modules/Linphone/Chat/Chat): use `Connections` component
parent
4a228d31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
Chat.qml
linphone-desktop/ui/modules/Linphone/Chat/Chat.qml
+26
-19
No files found.
linphone-desktop/ui/modules/Linphone/Chat/Chat.qml
View file @
92d076ff
...
...
@@ -52,6 +52,13 @@ Rectangle {
}
}
function
_initView
()
{
_tryToLoadMoreEntries
=
false
_bindToEnd
=
true
positionViewAtEnd
()
}
// -----------------------------------------------------------------------
Layout.fillHeight
:
true
...
...
@@ -77,28 +84,12 @@ Rectangle {
}
goToEnd
()
var
initView
=
function
()
{
_tryToLoadMoreEntries
=
false
_bindToEnd
=
true
positionViewAtEnd
()
}
// Received only if more entries were loaded.
proxyModel
.
moreEntriesLoaded
.
connect
(
function
(
n
)
{
positionViewAtIndex
(
n
-
1
,
ListView
.
Beginning
)
_tryToLoadMoreEntries
=
false
})
// When the view is changed (for example `Calls` -> `Messages`),
// the position is set at end and it can be possible to load
// more entries.
proxyModel
.
entryTypeFilterChanged
.
connect
(
initView
)
// First render.
initView
()
_
initView
()
}
// -----------------------------------------------------------------------
onMovementStarted
:
_bindToEnd
=
false
onMovementEnded
:
{
if
(
atYEnd
)
{
...
...
@@ -108,6 +99,22 @@ Rectangle {
onContentYChanged
:
_loadMoreEntries
()
// -----------------------------------------------------------------------
Connections
{
target
:
proxyModel
// When the view is changed (for example `Calls` -> `Messages`),
// the position is set at end and it can be possible to load
// more entries.
onEntryTypeFilterChanged
:
_initView
()
onMoreEntriesLoaded
:
{
chat
.
positionViewAtIndex
(
n
-
1
,
ListView
.
Beginning
)
chat
.
_tryToLoadMoreEntries
=
false
}
}
// -----------------------------------------------------------------------
// Heading.
// -----------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment