diff options
author | CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> | 2020-05-27 14:19:26 +0530 |
---|---|---|
committer | CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> | 2020-07-30 22:10:27 +0530 |
commit | f9c0f4dd5410621a8427e2ef21496b7791d44d2f (patch) | |
tree | 5c1ea107d3d4fff722538549f59454d87c1a667b /resources/qml/TimelineView.qml | |
parent | Adding DeviceList for userprofile (diff) | |
download | nheko-f9c0f4dd5410621a8427e2ef21496b7791d44d2f.tar.xz |
Add C++ Model for DeviceList
Diffstat (limited to 'resources/qml/TimelineView.qml')
-rw-r--r-- | resources/qml/TimelineView.qml | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index ed403aa9..e4c820f8 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -273,6 +273,9 @@ Page { color: colors.base } } + + property variant userProfile + Row { height: userName.height spacing: 8 @@ -287,8 +290,10 @@ Page { MouseArea { anchors.fill: parent onClicked: { - userProfile.user_data = modelData - userProfile.show() + if(userProfile) userProfile.destroy() + var component = Qt.createComponent("UserProfile.qml"); + userProfile = component.createObject(timelineRoot,{user_data : modelData}); + userProfile.show(); } cursorShape: Qt.PointingHandCursor propagateComposedEvents: true @@ -303,26 +308,17 @@ Page { MouseArea { anchors.fill: parent + Layout.alignment: Qt.AlignHCenter onClicked: { - userProfile.user_data = modelData - userProfile.show() + if(userProfile) userProfile.destroy() + var component = Qt.createComponent("UserProfile.qml") + userProfile = component.createObject(timelineRoot,{user_data : modelData}) + userProfile.show() } cursorShape: Qt.PointingHandCursor propagateComposedEvents: true } } - - Label { - color: colors.buttonText - text: timelineManager.userStatus(modelData.userId) - textFormat: Text.PlainText - elide: Text.ElideRight - width: chat.delegateMaxWidth - parent.spacing*2 - userName.implicitWidth - avatarSize - font.italic: true - } - UserProfile{ - id: userProfile - } } } } |