summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-07-23 16:17:43 +0000
committerGitHub <noreply@github.com>2021-07-23 16:17:43 +0000
commitca3d17dc22b8673bb826150732ecab2a0e8b7fc2 (patch)
treec1245b31ea0444bd65e300aa870f3abad44cfaca
parentUpdate mtxclient (diff)
parentmake lint (diff)
downloadnheko-ca3d17dc22b8673bb826150732ecab2a0e8b7fc2.tar.xz
Merge pull request #651 from LorenDB/qml-all-the-things
Fix a few UI things
-rw-r--r--resources/qml/InviteDialog.qml2
-rw-r--r--resources/qml/MessageView.qml19
-rw-r--r--src/timeline/TimelineViewManager.cpp7
-rw-r--r--src/timeline/TimelineViewManager.h1
4 files changed, 24 insertions, 5 deletions
diff --git a/resources/qml/InviteDialog.qml b/resources/qml/InviteDialog.qml

index 5aaf0d6d..50287ad5 100644 --- a/resources/qml/InviteDialog.qml +++ b/resources/qml/InviteDialog.qml
@@ -107,7 +107,7 @@ ApplicationWindow { userid: model.mxid url: model.avatarUrl.replace("mxc://", "image://MxcImage/") displayName: model.displayName - onClicked: Rooms.currentRoom.openUserProfile(model.mxid) + onClicked: TimelineManager.openGlobalUserProfile(model.mxid) } ColumnLayout { diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 564c8dc7..50cbd371 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml
@@ -477,12 +477,23 @@ ScrollView { } - footer: Spinner { + footer: Item { anchors.horizontalCenter: parent.horizontalCenter - running: chat.model && chat.model.paginationInProgress - foreground: Nheko.colors.mid + anchors.margins: Nheko.paddingLarge visible: chat.model && chat.model.paginationInProgress - z: 3 + // hacky, but works + height: loadingSpinner.height + 2 * Nheko.paddingLarge + + Spinner { + id: loadingSpinner + + anchors.centerIn: parent + anchors.margins: Nheko.paddingLarge + running: chat.model && chat.model.paginationInProgress + foreground: Nheko.colors.mid + z: 3 + } + } } diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 4353ef62..a6922be7 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -394,6 +394,13 @@ TimelineViewManager::openInviteUsers(QString roomId) } void +TimelineViewManager::openGlobalUserProfile(QString userId) +{ + UserProfile *profile = new UserProfile{QString{}, userId, this}; + emit openProfile(profile); +} + +void TimelineViewManager::setVideoCallItem() { WebRTCSession::instance().setVideoItem( diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index bdec405a..54e3a935 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h
@@ -69,6 +69,7 @@ public: Q_INVOKABLE void openRoomMembers(QString room_id); Q_INVOKABLE void openRoomSettings(QString room_id); Q_INVOKABLE void openInviteUsers(QString roomId); + Q_INVOKABLE void openGlobalUserProfile(QString userId); Q_INVOKABLE void focusMessageInput(); Q_INVOKABLE void openLeaveRoomDialog(QString roomid) const;