From aaa0024fd6100b7368ab5b5d1de1cc69e5959445 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 5 Dec 2020 00:26:37 +0100 Subject: [PATCH] Add easy way to switch between accounts Related to #121 --- imports/NeoChat/Page/RoomListPage.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/imports/NeoChat/Page/RoomListPage.qml b/imports/NeoChat/Page/RoomListPage.qml index d73d99840..38b153a2a 100644 --- a/imports/NeoChat/Page/RoomListPage.qml +++ b/imports/NeoChat/Page/RoomListPage.qml @@ -193,4 +193,20 @@ Kirigami.ScrollablePage { RoomListContextMenu {} } } + + footer: RowLayout { + visible: accountListTab.count > 1 + height: visible ? accountListTab.implicitHeight : 0 + Repeater { + id: accountListTab + model: AccountListModel { } + delegate: QQC2.TabButton { + checkable: true + checked: Controller.activeConnection.user.id === model.connection.user.id + onClicked: Controller.activeConnection = model.connection + Layout.fillWidth: true + text: model.user.id + } + } + } }