Fix getUser binding loops & coro race conditions

This commit is contained in:
miruka
2019-07-07 01:37:13 -04:00
parent 683ee3e1cf
commit be152c3acf
7 changed files with 30 additions and 27 deletions

View File

@@ -6,9 +6,7 @@ Column {
id: accountDelegate
width: parent.width
// Avoid binding loop by using Component.onCompleted
property var userInfo: null
Component.onCompleted: userInfo = users.getUser(model.userId)
property var userInfo: users.getUser(model.userId)
property bool expanded: true
@@ -19,6 +17,7 @@ Column {
HUserAvatar {
id: avatar
// Need to do this because conflict with the model property
Component.onCompleted: userId = model.userId
}