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 var userInfo: users.find(model.userId)
|
||||||
property bool expanded: true
|
property bool expanded: true
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted:
|
||||||
expanded = ! window.uiState.collapseAccounts[model.userId]
|
expanded = ! window.uiState.collapseAccounts[model.userId]
|
||||||
}
|
|
||||||
|
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
window.uiState.collapseAccounts[model.userId] = ! expanded
|
window.uiState.collapseAccounts[model.userId] = ! expanded
|
||||||
|
|
|
@ -20,12 +20,26 @@ Column {
|
||||||
property string roomListUserId: userId
|
property string roomListUserId: userId
|
||||||
property bool expanded: true
|
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 {
|
HRowLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
id: roomCategoryLabel
|
id: roomCategoryLabel
|
||||||
text: name
|
text: model.name
|
||||||
font.weight: Font.DemiBold
|
font.weight: Font.DemiBold
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user