messageOverlay scrolls to bottom when tabbed back to; hide buttetin for now
the build was successful Details

This commit is contained in:
Dan Ballard 2020-12-17 16:41:30 -08:00
parent 211e388a7d
commit 1dd634027f
2 changed files with 20 additions and 7 deletions

View File

@ -25,6 +25,11 @@ W.Overlay {
}
}
function overlaySelected() {
// Would be nice to not have to trigger the timer, but running positionViewAtEnd here triggers too soon so doesn't work
thymer.running = true
}
// onRowsInserted is firing after the model is updated but before the delegate is inflated
// causing positionViewAtEnd() to scroll to "just above the last message"
// so we use this timer to delay scrolling by a few milliseconds

View File

@ -23,7 +23,7 @@ ColumnLayout {
id: tabBar
Layout.fillWidth: true
model: [qsTr("chat-btn"), qsTr("lists-btn"), qsTr("bulletins-btn")]
model: [qsTr("chat-btn"), qsTr("lists-btn")/*, qsTr("bulletins-btn")*/]
onCurrentIndexChanged: overlayStack.overlay = currentIndex
}
@ -39,11 +39,12 @@ ColumnLayout {
property alias overlay: overlayStack.currentIndex
readonly property int chatOverlay: 0
readonly property int listOverlay: 1
readonly property int bulletinOverlay: 2
readonly property int membershipOverlay: 3
//readonly property int bulletinOverlay: 2
readonly property int membershipOverlay: 2
ChatOverlay { //0
id: chat
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}
@ -53,14 +54,21 @@ ColumnLayout {
Layout.maximumWidth: overlayStack.width
}
BulletinOverlay{ //2
// TODO: Bulletin project: full design and update pass on Bulletin
/*BulletinOverlay{ //2
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}*/
MembershipOverlay { //2
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}
MembershipOverlay { //3
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
onCurrentIndexChanged: function() {
if (currentIndex == chatOverlay) {
chat.overlaySelected()
}
}
}