Merge pull request #347 from kamathmanu/avatarFullViewSupport

Add support for viewing avatar images in full size
This commit is contained in:
DeepBlueV7.X 2020-11-30 21:25:42 +01:00 committed by GitHub
commit 95667edb14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,12 @@ Rectangle {
}
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: TimelineManager.openImageOverlay(TimelineManager.timeline.avatarUrl(userid), TimelineManager.timeline.data.id)
}
}
Rectangle {

View File

@ -363,6 +363,9 @@ TimelineViewManager::toggleCameraView()
void
TimelineViewManager::openImageOverlay(QString mxcUrl, QString eventId) const
{
if (mxcUrl.isEmpty()) {
return;
}
QQuickImageResponse *imgResponse =
imgProvider->requestImageResponse(mxcUrl.remove("mxc://"), QSize());
connect(imgResponse, &QQuickImageResponse::finished, this, [this, eventId, imgResponse]() {