Rename RoomPane and AccountBar components

This commit is contained in:
miruka 2020-04-27 22:40:04 -04:00
parent 65103eaaba
commit 93c7fadeed
4 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,6 @@
# TODO
- save/restore swipeview current rooms for accounts
- lag when switching accounts
- message delegate too tall

View File

@ -8,7 +8,7 @@ import "../Base"
import "../Base/HTile"
HColumnLayout {
property RoomPane roomContainer
property AccountView accountView
HButton {
@ -25,7 +25,7 @@ HColumnLayout {
HListView {
id: accountList
model: ModelStore.get("accounts")
currentIndex: roomContainer.currentIndex
currentIndex: accountView.currentIndex
delegate: HTileDelegate {
id: tile
@ -49,7 +49,7 @@ HColumnLayout {
}
}
onLeftClicked: roomContainer.currentIndex = model.index
onLeftClicked: accountView.currentIndex = model.index
}
Layout.fillWidth: true
@ -57,12 +57,12 @@ HColumnLayout {
HShortcut {
sequences: window.settings.keys.goToPreviousAccount
onActivated: roomContainer.decrementWrapIndex()
onActivated: accountView.decrementWrapIndex()
}
HShortcut {
sequences: window.settings.keys.goToNextAccount
onActivated: roomContainer.incrementWrapIndex()
onActivated: accountView.incrementWrapIndex()
}
}

View File

@ -26,15 +26,15 @@ HDrawer {
HRowLayout {
anchors.fill: parent
AccountBar {
AccountsBar {
id: accountBar
roomContainer: roomPane
accountView: accView
Layout.fillWidth: false
}
RoomPane {
id: roomPane
AccountView {
id: accView
currentIndex: 0
Layout.fillWidth: true