Revert "Fix the one-line events combining"
This reverts commit 39f159f0a3
.
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
|
- 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)
|
## 0.6.4 (2020-09-16)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ HRowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property string senderText:
|
readonly property string senderText:
|
||||||
asOneLine || onRight || combine ? "" : (
|
hideNameLine ? "" : (
|
||||||
`<${compact ? "span" : "div"} class='sender'>` +
|
`<${compact ? "span" : "div"} class='sender'>` +
|
||||||
utils.coloredNameHtml(model.sender_name, model.sender_id) +
|
utils.coloredNameHtml(model.sender_name, model.sender_id) +
|
||||||
(compact ? ": " : "") +
|
(compact ? ": " : "") +
|
||||||
|
@ -94,25 +94,12 @@ HRowLayout {
|
||||||
opacity: combine ? 0 : 1
|
opacity: combine ? 0 : 1
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.preferredHeight: combine ? 1 : Layout.preferredWidth
|
||||||
Layout.preferredWidth:
|
Layout.preferredWidth:
|
||||||
compact ?
|
compact ?
|
||||||
theme.chat.message.collapsedAvatarSize :
|
theme.chat.message.collapsedAvatarSize :
|
||||||
theme.chat.message.avatarSize
|
theme.chat.message.avatarSize
|
||||||
|
|
||||||
Layout.preferredHeight:
|
|
||||||
combine ?
|
|
||||||
1 :
|
|
||||||
|
|
||||||
compact || (
|
|
||||||
asOneLine &&
|
|
||||||
nextModel &&
|
|
||||||
eventList.canCombine(model, nextModel)
|
|
||||||
) ?
|
|
||||||
theme.chat.message.collapsedAvatarSize :
|
|
||||||
|
|
||||||
theme.chat.message.avatarSize
|
|
||||||
|
|
||||||
HUserAvatar {
|
HUserAvatar {
|
||||||
id: avatar
|
id: avatar
|
||||||
clientUserId: chat.userId
|
clientUserId: chat.userId
|
||||||
|
@ -122,6 +109,7 @@ HRowLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: combine ? 1 : parent.Layout.preferredWidth
|
height: combine ? 1 : parent.Layout.preferredWidth
|
||||||
radius: theme.chat.message.avatarRadius
|
radius: theme.chat.message.avatarRadius
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,20 @@ HColumnLayout {
|
||||||
readonly property bool isRedacted: model.event_type === "RedactedEvent"
|
readonly property bool isRedacted: model.event_type === "RedactedEvent"
|
||||||
readonly property bool onRight: ! eventList.ownEventsOnLeft && isOwn
|
readonly property bool onRight: ! eventList.ownEventsOnLeft && isOwn
|
||||||
readonly property bool combine: eventList.canCombine(previousModel, model)
|
readonly property bool combine: eventList.canCombine(previousModel, model)
|
||||||
readonly property bool asOneLine: eventList.renderEventAsOneLine(model)
|
|
||||||
readonly property bool talkBreak:
|
readonly property bool talkBreak:
|
||||||
eventList.canTalkBreak(previousModel, model)
|
eventList.canTalkBreak(previousModel, model)
|
||||||
readonly property bool dayBreak:
|
readonly property bool dayBreak:
|
||||||
eventList.canDayBreak(previousModel, model)
|
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:
|
readonly property int cursorShape:
|
||||||
eventContent.hoveredLink ? Qt.PointingHandCursor :
|
eventContent.hoveredLink ? Qt.PointingHandCursor :
|
||||||
eventContent.hoveredSelectable ? Qt.IBeamCursor :
|
eventContent.hoveredSelectable ? Qt.IBeamCursor :
|
||||||
|
|
|
@ -363,13 +363,6 @@ Rectangle {
|
||||||
return item.date.getDate() !== itemAfter.date.getDate()
|
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() {
|
function loadPastEvents() {
|
||||||
loadPastEventsFutureId = py.callClientCoro(
|
loadPastEventsFutureId = py.callClientCoro(
|
||||||
chat.userId,
|
chat.userId,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user