Save/load which room categories are collapsed
This commit is contained in:
parent
f7d286cdc2
commit
238f38c9f0
|
@ -12,9 +12,8 @@ Column {
|
|||
property var userInfo: users.find(model.userId)
|
||||
property bool expanded: true
|
||||
|
||||
Component.onCompleted: {
|
||||
Component.onCompleted:
|
||||
expanded = ! window.uiState.collapseAccounts[model.userId]
|
||||
}
|
||||
|
||||
onExpandedChanged: {
|
||||
window.uiState.collapseAccounts[model.userId] = ! expanded
|
||||
|
|
|
@ -20,12 +20,26 @@ Column {
|
|||
property string roomListUserId: userId
|
||||
property bool expanded: true
|
||||
|
||||
Component.onCompleted: {
|
||||
if (! window.uiState.collapseCategories[model.userId]) {
|
||||
window.uiState.collapseCategories[model.userId] = {}
|
||||
window.uiStateChanged()
|
||||
}
|
||||
|
||||
expanded = !window.uiState.collapseCategories[model.userId][model.name]
|
||||
}
|
||||
|
||||
onExpandedChanged: {
|
||||
window.uiState.collapseCategories[model.userId][model.name] = !expanded
|
||||
window.uiStateChanged()
|
||||
}
|
||||
|
||||
HRowLayout {
|
||||
width: parent.width
|
||||
|
||||
HLabel {
|
||||
id: roomCategoryLabel
|
||||
text: name
|
||||
text: model.name
|
||||
font.weight: Font.DemiBold
|
||||
elide: Text.ElideRight
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user