fix(Communities): make opening profile popup from within memberlist work again

This broken when we refactored the modal to be a `StatusModal` because the loaded
content can no longer rely on globals.
This commit is contained in:
Pascal Precht 2021-07-21 11:51:24 +02:00 committed by Iuri Matias
parent 8a504ce190
commit e6059db5ac
1 changed files with 19 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import StatusQ.Popups 0.1
import "../../../../imports" import "../../../../imports"
import "../../../../shared" import "../../../../shared"
import "../components"
Item { Item {
id: root id: root
@ -174,7 +175,14 @@ Item {
//% "View Profile" //% "View Profile"
text: qsTrId("view-profile") text: qsTrId("view-profile")
icon.name: "channel" icon.name: "channel"
onTriggered: openProfilePopup(model.userName, model.pubKey, memberItem.image.source, '', memberItem.nickname) onTriggered: openPopup(profilePopup, {
noFooter: profileModel.profile.pubKey !== model.pubKey,
userName: model.userName,
fromAuthor: model.pubKey,
identicon: memberItem.image.source,
text: '',
nickname: memberItem.nickname
})
} }
StatusMenuSeparator { StatusMenuSeparator {
@ -216,4 +224,14 @@ Item {
} }
} }
} }
Component {
id: profilePopup
ProfilePopup {
height: 504
onClosed: {
destroy()
}
}
}
} }