diff --git a/src/qml/Chat/Chat.qml b/src/qml/Chat/Chat.qml index c2324a9e..6f70fa6b 100644 --- a/src/qml/Chat/Chat.qml +++ b/src/qml/Chat/Chat.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import "../Base" import "Banners" -import "RoomEventList" +import "Timeline" import "RoomSidePane" HColumnLayout { @@ -50,7 +50,7 @@ HColumnLayout { HColumnLayout { Layout.fillWidth: true - RoomEventList { + EventList { Layout.fillWidth: true Layout.fillHeight: true } diff --git a/src/qml/Chat/RoomEventList/EventContent.qml b/src/qml/Chat/RoomEventList/EventContent.qml deleted file mode 100644 index 3ecb92a5..00000000 --- a/src/qml/Chat/RoomEventList/EventContent.qml +++ /dev/null @@ -1,53 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.3 -import "../../Base" -import "../utils.js" as ChatJS - -Row { - id: eventContent - spacing: standardSpacing / 2 - layoutDirection: isOwn ? Qt.RightToLeft : Qt.LeftToRight - - width: Math.min( - roomEventListView.width - avatar.width - eventContent.spacing, - HStyle.fontSize.normal * 0.5 * 75, // 600 with 16px font - contentLabel.implicitWidth - ) - - HAvatar { - id: avatar - name: sender.displayName || stripUserId(sender.userId) - hidden: combine - dimension: 28 - } - - HLabel { - width: parent.width - - id: contentLabel - text: "" + - sender.displayName.value + " " + - ChatJS.getEventText(type, dict) + - - "  " + - "" + - Qt.formatDateTime(dateTime, "hh:mm:ss") + - " " + - "" - - textFormat: Text.RichText - background: Rectangle {color: HStyle.chat.event.background} - wrapMode: Text.Wrap - - leftPadding: horizontalPadding - rightPadding: horizontalPadding - topPadding: verticalPadding - bottomPadding: verticalPadding - } -} diff --git a/src/qml/Chat/RoomEventList/Daybreak.qml b/src/qml/Chat/Timeline/Daybreak.qml similarity index 100% rename from src/qml/Chat/RoomEventList/Daybreak.qml rename to src/qml/Chat/Timeline/Daybreak.qml diff --git a/src/qml/Chat/RoomEventList/MessageContent.qml b/src/qml/Chat/Timeline/EventContent.qml similarity index 100% rename from src/qml/Chat/RoomEventList/MessageContent.qml rename to src/qml/Chat/Timeline/EventContent.qml diff --git a/src/qml/Chat/RoomEventList/RoomEventDelegate.qml b/src/qml/Chat/Timeline/EventDelegate.qml similarity index 99% rename from src/qml/Chat/RoomEventList/RoomEventDelegate.qml rename to src/qml/Chat/Timeline/EventDelegate.qml index 70d57c2b..9c7512e3 100644 --- a/src/qml/Chat/RoomEventList/RoomEventDelegate.qml +++ b/src/qml/Chat/Timeline/EventDelegate.qml @@ -73,7 +73,7 @@ Column { height: topPadding } - MessageContent { + EventContent { anchors.right: isOwn ? parent.right : undefined } } diff --git a/src/qml/Chat/RoomEventList/RoomEventList.qml b/src/qml/Chat/Timeline/EventList.qml similarity index 96% rename from src/qml/Chat/RoomEventList/RoomEventList.qml rename to src/qml/Chat/Timeline/EventList.qml index a26eaafe..b5ee08f8 100644 --- a/src/qml/Chat/RoomEventList/RoomEventList.qml +++ b/src/qml/Chat/Timeline/EventList.qml @@ -20,7 +20,7 @@ HRectangle { } } - delegate: RoomEventDelegate {} + delegate: EventDelegate {} anchors.fill: parent anchors.leftMargin: space