summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-10-13 15:10:33 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:06:15 +0100
commita83ae7e95fcb21f0f61cdb7d8cf9e4c4985bd853 (patch)
tree524579f023af97d65646b085db180f6db6ae7edc /resources/qml
parentLoad content if no scrollbar is needed (diff)
downloadnheko-a83ae7e95fcb21f0f61cdb7d8cf9e4c4985bd853.tar.xz
Fix section layout issues and pagination issues
Pagination could get stuck, if the messages request failed.
Section height seemes to have been calculated to late, which would make
some section overlap the next message in some cases. Fix that by doing
the height calculation manually.
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/TimelineView.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index ef1db0f0..b0a8853e 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -68,7 +68,7 @@ Rectangle {
 				model.currentIndex = newIndex
 			}
 
-			if (contentHeight < height) {
+			if (contentHeight < height && model) {
 				model.fetchHistory();
 			}
 		}
@@ -143,8 +143,7 @@ Rectangle {
 				spacing: 8
 
 				width: parent.width
-
-				Component.onCompleted: chat.forceLayout()
+				height: (section.includes(" ") ? dateBubble.height + 8 + userName.height : userName.height) + 8
 
 				Label {
 					id: dateBubble