diff --git a/src/qml/EventHandlers/rooms.js b/src/qml/EventHandlers/rooms.js index 2f9650c1..171485c2 100644 --- a/src/qml/EventHandlers/rooms.js +++ b/src/qml/EventHandlers/rooms.js @@ -82,13 +82,13 @@ function onTimelineEventReceived( "content": content, "isLocalEcho": true }, 1, 500) + if (found.length > 0) { timelines.set(found[0], item) - return + } else { + // Multiple clients will emit duplicate events with the same eventId + timelines.upsert({"eventId": event_id}, item, true, 500) } - - // Multiple clients will emit duplicate events with the same eventId - timelines.upsert({"eventId": event_id}, item, true, 500) } diff --git a/src/qml/Models/Rooms.qml b/src/qml/Models/Rooms.qml index d5f35fbb..e17fb6b4 100644 --- a/src/qml/Models/Rooms.qml +++ b/src/qml/Models/Rooms.qml @@ -2,4 +2,8 @@ import QtQuick 2.7 import SortFilterProxyModel 0.2 import "../Base" -HListModel {} +HListModel { + sorters: StringSorter { + roleName: "displayName" + } +}