diff --git a/TODO.md b/TODO.md index abf70131..d6aab6f9 100644 --- a/TODO.md +++ b/TODO.md @@ -9,6 +9,8 @@ - Unfinished work in button-refactor branch - Button can get "hoverEnabled: false" to let HoverHandlers work - Room Sidepane + - Hide when window too small + - Also save/load its size - When qml syntax highlighting supports string interpolation, use them - Fixes diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index 6edb13e9..d081b40f 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -12,6 +12,15 @@ Column { property var userInfo: users.find(model.userId) property bool expanded: true + Component.onCompleted: { + expanded = ! window.uiState.collapseAccounts[model.userId] + } + + onExpandedChanged: { + window.uiState.collapseAccounts[model.userId] = ! expanded + window.uiStateChanged() + } + HInteractiveRectangle { width: parent.width height: childrenRect.height