From 64f204d984d4c4f520f8c5de613e17b01dd9a317 Mon Sep 17 00:00:00 2001 From: CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> Date: Sun, 17 May 2020 19:04:47 +0530 Subject: Rewrite UserProfile in qml --- resources/qml/TimelineView.qml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'resources/qml/TimelineView.qml') diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index dd35473c..ed403aa9 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -286,7 +286,10 @@ Page { MouseArea { anchors.fill: parent - onClicked: chat.model.openUserProfile(modelData.userId) + onClicked: { + userProfile.user_data = modelData + userProfile.show() + } cursorShape: Qt.PointingHandCursor propagateComposedEvents: true } @@ -300,7 +303,10 @@ Page { MouseArea { anchors.fill: parent - onClicked: chat.model.openUserProfile(section.split(" ")[0]) + onClicked: { + userProfile.user_data = modelData + userProfile.show() + } cursorShape: Qt.PointingHandCursor propagateComposedEvents: true } @@ -314,6 +320,9 @@ Page { width: chat.delegateMaxWidth - parent.spacing*2 - userName.implicitWidth - avatarSize font.italic: true } + UserProfile{ + id: userProfile + } } } } -- cgit 1.5.1