Revert "Fix the one-line events combining"
This reverts commit 39f159f0a370bcc5b9aa8503df62cf87df395fb7. Causes problems when message delegates are reordered, with the transition animations randomly stopping in the middle and leaving delegates at odd positions.
This commit is contained in:
parent
32200f256b
commit
81c460cbaf
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 :
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user