mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 12:08:53 +00:00
fix: make user profile images work again
This commit is contained in:
parent
1e8f51fff6
commit
36f1ea8832
@ -42,7 +42,8 @@ ModalPopup {
|
||||
pubKey: popup.store.profileModelInst.profile.pubKey,
|
||||
address: "",
|
||||
identicon: popup.store.profileModelInst.profile.identicon,
|
||||
thumbnailImage: popup.store.profileModelInst.profile.thumbnailImage,
|
||||
//TODO move to store
|
||||
thumbnailImage: profileModule.model.thumbnailImage,
|
||||
isUser: true
|
||||
});
|
||||
noContactsRect.visible = !popup.store.profileModelInst.contacts.list.hasAddedContacts();
|
||||
|
@ -64,7 +64,7 @@ ModalPopup {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: appMain.getProfileImage(popup.store.profileModelInst.profile.pubKey)
|
||||
source: appMain.getProfileImage(popup.store.profileModuleInst.model.pubKey)
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -12,6 +12,7 @@ QtObject {
|
||||
property var utilsModelInst: utilsModel
|
||||
property var walletModelInst: walletModel
|
||||
property var profileModelInst: profileModel
|
||||
property var profileModuleInst: profileModule
|
||||
|
||||
property var activeCommunity: chatsModelInst.communities.activeCommunity
|
||||
|
||||
|
@ -427,7 +427,8 @@ Item {
|
||||
}
|
||||
|
||||
EmptyChatPanel {
|
||||
onShareChatKeyClicked: openProfilePopup(root.rootStore.profileModelInst.profile.username, root.rootStore.profileModelInst.profile.pubKey, root.rootStore.profileModelInst.profile.thumbnailImage);
|
||||
//TODO move profileModule to store
|
||||
onShareChatKeyClicked: openProfilePopup(root.rootStore.profileModelInst.profile.username, root.rootStore.profileModelInst.profile.pubKey, profileModule.model.thumbnailImage);
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
@ -48,7 +48,8 @@ Item {
|
||||
|
||||
function getProfileImage(pubkey, isCurrentUser, useLargeImage) {
|
||||
if (isCurrentUser || (isCurrentUser === undefined && pubkey === profileModel.profile.pubKey)) {
|
||||
return profileModel.profile.thumbnailImage
|
||||
//TODO move profileModule to store
|
||||
return profileModule.model.thumbnailImage
|
||||
}
|
||||
|
||||
const index = profileModel.contacts.list.getContactIndexByPubkey(pubkey)
|
||||
@ -354,7 +355,8 @@ Item {
|
||||
navBarProfileButton: StatusNavBarTabButton {
|
||||
id: profileButton
|
||||
property bool opened: false
|
||||
icon.source: profileModule.thumbnailImage || ""
|
||||
//TODO move profileModule to store
|
||||
icon.source: profileModule.model.thumbnailImage || ""
|
||||
badge.visible: true
|
||||
badge.anchors.rightMargin: 4
|
||||
badge.anchors.topMargin: 25
|
||||
@ -362,7 +364,7 @@ Item {
|
||||
badge.implicitWidth: 15
|
||||
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusAppNavBar.backgroundColor
|
||||
badge.color: {
|
||||
return profileModel.profile.sendUserStatus ? Style.current.green : Style.current.midGrey
|
||||
return profileModule.model.sendUserStatus ? Style.current.green : Style.current.midGrey
|
||||
/*
|
||||
// Use this code once support for custom user status is added
|
||||
switch(profileModel.profile.currentUserStatus){
|
||||
|
@ -29,12 +29,12 @@ PopupMenu {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 4
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
image.source: profileModule.thumbnailImage || ""
|
||||
image.source: profileModule.model.thumbnailImage || ""
|
||||
image.isIdenticon: true
|
||||
}
|
||||
StyledText {
|
||||
id: username
|
||||
text: Utils.removeStatusEns(profileModel.ens.preferredUsername || profileModel.profile.username)
|
||||
text: Utils.removeStatusEns(profileModel.ens.preferredUsername || profileModule.model.username)
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 3
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@ -70,7 +70,8 @@ PopupMenu {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
openProfilePopup(profileModule.username, profileModule.pubKey, profileModule.thumbnailImage || "");
|
||||
//TODO move profileModule to store
|
||||
openProfilePopup(profileModule.model.username, profileModule.model.pubKey, profileModule.model.thumbnailImage || "");
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
@ -859,7 +859,8 @@ Rectangle {
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.halfPadding
|
||||
image.source: profileModel.profile.thumbnailImage || profileModel.profile.identicon
|
||||
//TODO move thumbnail image to store
|
||||
image.source: profileModule.model.thumbnailImage || profileModule.model.identicon
|
||||
image.isIdenticon: true
|
||||
visible: control.isStatusUpdateInput
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user