diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8af9e367..f69220ae 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -184,6 +184,10 @@ and this project adheres to - Fix scrolling keybinds not working to scroll popups +- Revert 0.6.2's message combining fix, which caused message bubble movements + to randomly stop in the middle of their animations and be left at odd + positions or overlap with other bubbles + ## 0.6.4 (2020-09-16) diff --git a/src/gui/Pages/Chat/Timeline/EventContent.qml b/src/gui/Pages/Chat/Timeline/EventContent.qml index 7750a8e1..7b879919 100644 --- a/src/gui/Pages/Chat/Timeline/EventContent.qml +++ b/src/gui/Pages/Chat/Timeline/EventContent.qml @@ -27,7 +27,7 @@ HRowLayout { } readonly property string senderText: - asOneLine || onRight || combine ? "" : ( + hideNameLine ? "" : ( `<${compact ? "span" : "div"} class='sender'>` + utils.coloredNameHtml(model.sender_name, model.sender_id) + (compact ? ": " : "") + @@ -94,25 +94,12 @@ HRowLayout { opacity: combine ? 0 : 1 Layout.alignment: Qt.AlignTop - + Layout.preferredHeight: combine ? 1 : Layout.preferredWidth Layout.preferredWidth: compact ? theme.chat.message.collapsedAvatarSize : theme.chat.message.avatarSize - Layout.preferredHeight: - combine ? - 1 : - - compact || ( - asOneLine && - nextModel && - eventList.canCombine(model, nextModel) - ) ? - theme.chat.message.collapsedAvatarSize : - - theme.chat.message.avatarSize - HUserAvatar { id: avatar clientUserId: chat.userId @@ -122,6 +109,7 @@ HRowLayout { width: parent.width height: combine ? 1 : parent.Layout.preferredWidth radius: theme.chat.message.avatarRadius + } } diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index b2a5bf3e..2b4e0b6c 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -25,12 +25,20 @@ HColumnLayout { readonly property bool isRedacted: model.event_type === "RedactedEvent" readonly property bool onRight: ! eventList.ownEventsOnLeft && isOwn readonly property bool combine: eventList.canCombine(previousModel, model) - readonly property bool asOneLine: eventList.renderEventAsOneLine(model) readonly property bool talkBreak: eventList.canTalkBreak(previousModel, model) readonly property bool dayBreak: eventList.canDayBreak(previousModel, model) + readonly property bool hideNameLine: + model.event_type === "RoomMessageEmote" || + ! ( + model.event_type.startsWith("RoomMessage") || + model.event_type.startsWith("RoomEncrypted") + ) || + onRight || + combine + readonly property int cursorShape: eventContent.hoveredLink ? Qt.PointingHandCursor : eventContent.hoveredSelectable ? Qt.IBeamCursor : diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index d35e2279..185d9d92 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -363,13 +363,6 @@ Rectangle { return item.date.getDate() !== itemAfter.date.getDate() } - function renderEventAsOneLine(event) { - return event.event_type === "RoomMessageEmote" || ( - ! event.event_type.startsWith("RoomMessage") && - ! event.event_type.startsWith("RoomEncrypted") - ) - } - function loadPastEvents() { loadPastEventsFutureId = py.callClientCoro( chat.userId,