Remove all Backend "get_any_client"-using methods
thumbnail() and download() were remaining. Use a direct and carefully chosen MatrixClient's methods instead to avoid problems mentioned in the previous commit 7502c1.
This commit is contained in:
@@ -93,6 +93,7 @@ HFlickableColumnPage {
|
||||
|
||||
property bool changed: Boolean(sourceOverride)
|
||||
|
||||
clientUserId: page.userId
|
||||
userId: page.userId
|
||||
displayName: nameField.item.text
|
||||
mxc: account ? account.avatar_url : ""
|
||||
|
@@ -69,6 +69,7 @@ HFlickableColumnPage {
|
||||
|
||||
HRoomAvatar {
|
||||
id: avatar
|
||||
clientUserId: page.userId
|
||||
roomId: ""
|
||||
displayName: nameField.item.text
|
||||
|
||||
|
@@ -8,7 +8,7 @@ HUserAvatar {
|
||||
property QtObject account
|
||||
|
||||
|
||||
// userId: (set me)
|
||||
clientUserId: userId
|
||||
displayName: account ? account.display_name : ""
|
||||
mxc: account ? account.avatar_url : ""
|
||||
|
||||
|
@@ -16,6 +16,7 @@ HTile {
|
||||
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
userId: model.id
|
||||
displayName: model.display_name
|
||||
mxc: model.avatar_url
|
||||
|
@@ -40,6 +40,7 @@ Rectangle {
|
||||
|
||||
HUserAvatar {
|
||||
id: bannerAvatar
|
||||
clientUserId: chat.userId
|
||||
anchors.centerIn: parent
|
||||
radius: 0
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ Rectangle {
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
radius: 0
|
||||
clientUserId: messageArea.writingUserId
|
||||
userId: messageArea.writingUserId
|
||||
|
||||
mxc:
|
||||
|
@@ -52,6 +52,7 @@ Rectangle {
|
||||
|
||||
HRoomAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
roomId: chat.roomId
|
||||
displayName: chat.roomInfo.display_name
|
||||
mxc: chat.roomInfo.avatar_url
|
||||
|
@@ -23,6 +23,7 @@ HTile {
|
||||
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
userId: model.id
|
||||
displayName: model.display_name
|
||||
mxc: model.avatar_url
|
||||
|
@@ -61,6 +61,7 @@ HListView {
|
||||
root.currentIndex = 0
|
||||
|
||||
HUserAvatar {
|
||||
clientUserId: chat.userId
|
||||
userId: member.id
|
||||
displayName: member.display_name
|
||||
mxc: member.avatar_url
|
||||
|
@@ -82,6 +82,7 @@ HFlickableColumnPage {
|
||||
|
||||
HRoomAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
roomId: chat.roomId
|
||||
displayName: nameField.item.text || chat.roomInfo.display_name
|
||||
mxc: chat.roomInfo.avatar_url
|
||||
|
@@ -94,6 +94,7 @@ HRowLayout {
|
||||
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
userId: model.sender_id
|
||||
displayName: model.sender_name
|
||||
mxc: model.sender_avatar
|
||||
|
@@ -60,6 +60,7 @@ HMxcImage {
|
||||
height: fitSize.height
|
||||
horizontalAlignment: Image.AlignLeft
|
||||
|
||||
clientUserId: chat.userId
|
||||
title: thumbnail ? loader.thumbnailTitle : loader.title
|
||||
animated: eventList.isAnimated(loader.singleMediaInfo)
|
||||
thumbnail: ! animated && loader.thumbnailMxc
|
||||
|
@@ -416,6 +416,7 @@ Rectangle {
|
||||
window.makePopup(
|
||||
"Popups/ImageViewerPopup/ImageViewerPopup.qml",
|
||||
{
|
||||
clientUserId: chat.userId,
|
||||
thumbnailTitle: getThumbnailTitle(event),
|
||||
thumbnailMxc: event.thumbnail_url,
|
||||
thumbnailPath: eventList.thumbnailCachedPaths[event.id],
|
||||
@@ -459,6 +460,7 @@ Rectangle {
|
||||
print("Downloading " + event.media_url + " ...")
|
||||
|
||||
const args = [
|
||||
chat.userId,
|
||||
event.media_url,
|
||||
event.media_title,
|
||||
JSON.parse(event.media_crypt_dict),
|
||||
|
Reference in New Issue
Block a user