diff --git a/qml/component/MessageDelegate.qml b/qml/component/MessageDelegate.qml index f72e399..c4198aa 100644 --- a/qml/component/MessageDelegate.qml +++ b/qml/component/MessageDelegate.qml @@ -109,6 +109,14 @@ RowLayout { spacing: 4 + AutoLabel { + visible: userMarker.length > 5 + text: userMarker.length - 5 + "+" + coloredBackground: highlighted + Material.foreground: "grey" + font.pointSize: 8 + } + Repeater { model: userMarker.length > 5 ? userMarker.slice(0, 5) : userMarker @@ -121,14 +129,6 @@ RowLayout { } } - AutoLabel { - visible: userMarker.length > 5 - text: userMarker.length - 5 + "+" - coloredBackground: highlighted - Material.foreground: "grey" - font.pointSize: 8 - } - AutoLabel { id: timeLabel diff --git a/qml/form/RoomForm.qml b/qml/form/RoomForm.qml index ff9899e..2ffc236 100644 --- a/qml/form/RoomForm.qml +++ b/qml/form/RoomForm.qml @@ -336,6 +336,8 @@ Item { Layout.fillWidth: true Layout.preferredHeight: 48 + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + clip: true TextArea { @@ -343,6 +345,7 @@ Item { id: inputField + wrapMode: Text.Wrap placeholderText: "Send a Message" leftPadding: 16 topPadding: 0 diff --git a/spectral.pro b/spectral.pro index f498eaa..10f53d4 100644 --- a/spectral.pro +++ b/spectral.pro @@ -1,6 +1,7 @@ QT += quick widgets multimedia CONFIG += c++14 CONFIG += object_parallel_to_source +CONFIG += link_pkgconfig # Enable this to use QtQuick Compiler. #CONFIG += qtquickcompiler @@ -9,7 +10,6 @@ TARGET = spectral packagesExist(QMatrixClient) { message("Found libQMatrixClient via pkg-config.") - CONFIG += link_pkgconfig PKGCONFIG += QMatrixClient } else { include(include/libqmatrixclient/libqmatrixclient.pri) diff --git a/src/spectralroom.cpp b/src/spectralroom.cpp index 24cf1ac..eef0542 100644 --- a/src/spectralroom.cpp +++ b/src/spectralroom.cpp @@ -142,6 +142,8 @@ void SpectralRoom::sendReply(QString userId, QString eventId, } QDateTime SpectralRoom::lastActiveTime() { - if (timelineSize() == 0) return QDateTime(); - return messageEvents().rbegin()->get()->timestamp(); + if (timelineSize() == 0) return QDateTime(); + return messageEvents().rbegin()->get()->timestamp(); } + +float SpectralRoom::orderForTag(QString name) { return tag(name).order; } diff --git a/src/spectralroom.h b/src/spectralroom.h index be0ed8d..3dd5c34 100644 --- a/src/spectralroom.h +++ b/src/spectralroom.h @@ -37,6 +37,8 @@ class SpectralRoom : public Room { QDateTime lastActiveTime(); + Q_INVOKABLE float orderForTag(QString name); + private: QString m_cachedInput; QSet highlights;