diff --git a/TODO.md b/TODO.md index f85be07b..90ca4554 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,6 @@ # TODO +- save/restore swipeview current rooms for accounts - lag when switching accounts - message delegate too tall diff --git a/src/gui/MainPane/RoomPane.qml b/src/gui/MainPane/AccountView.qml similarity index 100% rename from src/gui/MainPane/RoomPane.qml rename to src/gui/MainPane/AccountView.qml diff --git a/src/gui/MainPane/AccountBar.qml b/src/gui/MainPane/AccountsBar.qml similarity index 88% rename from src/gui/MainPane/AccountBar.qml rename to src/gui/MainPane/AccountsBar.qml index 20826276..9e06a58e 100644 --- a/src/gui/MainPane/AccountBar.qml +++ b/src/gui/MainPane/AccountsBar.qml @@ -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() } } diff --git a/src/gui/MainPane/MainPane.qml b/src/gui/MainPane/MainPane.qml index d3d0efe1..9933c48c 100644 --- a/src/gui/MainPane/MainPane.qml +++ b/src/gui/MainPane/MainPane.qml @@ -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