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