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:
miruka
2020-08-23 16:57:53 -04:00
parent 0f2efa9ba3
commit df3f1fb645
24 changed files with 117 additions and 129 deletions

View File

@@ -94,6 +94,7 @@ HRowLayout {
HUserAvatar {
id: avatar
clientUserId: chat.userId
userId: model.sender_id
displayName: model.sender_name
mxc: model.sender_avatar

View File

@@ -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

View File

@@ -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),