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 # TODO
- save/restore swipeview current rooms for accounts
- lag when switching accounts - lag when switching accounts
- message delegate too tall - message delegate too tall

View File

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

View File

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