mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Merge pull request #347 from kamathmanu/avatarFullViewSupport
Add support for viewing avatar images in full size
This commit is contained in:
commit
95667edb14
2 changed files with 9 additions and 0 deletions
|
@ -49,6 +49,12 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
onClicked: TimelineManager.openImageOverlay(TimelineManager.timeline.avatarUrl(userid), TimelineManager.timeline.data.id)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -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]() {
|
||||
|
|
Loading…
Reference in a new issue