Rework how messages and events are handled

- No more translatable, content_type, show_name_line attrs for
  TimelineEventReceived.
  Since they are UI concerns, they are handled directly in QML.

- Refactor the EventDelegate and get rid of errors when new items
  are added to the timeline

- Messages, events and emotes all combine correctly.

- No more 28px wide avatars for events, to make them uniform with
  messages.
This commit is contained in:
miruka
2019-07-19 23:07:26 -04:00
parent ecc2c099f1
commit cea586120e
9 changed files with 148 additions and 160 deletions

View File

@@ -71,14 +71,12 @@ function onRoomForgotten(userId, roomId) {
function onTimelineEventReceived(
eventType, roomId, eventId, senderId, date, content,
contentType, isLocalEcho, showNameLine, translatable, targetUserId
eventType, roomId, eventId, senderId, date, content, isLocalEcho,
targetUserId
) {
let item = {
eventType: py.getattr(eventType, "__name__"),
roomId, eventId, senderId, date, content, contentType, isLocalEcho,
showNameLine, translatable, targetUserId
roomId, eventId, senderId, date, content, isLocalEcho, targetUserId
}
if (isLocalEcho) {