Show thread on latest message
Use the new thread functionality in libQuotient to show the thread on the latest message rather than the root. Note: to test you need to bump your libquotient minor version to 10 or higher. Also Note: this reveals some other bugs in how new threads are shown or refreshed when new messages are added, this will be fixed in a later patch as some re-architecting is required
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
#include <Quotient/events/roommessageevent.h>
|
||||
#include <Quotient/events/stickerevent.h>
|
||||
#include <Quotient/qt_connection_util.h>
|
||||
#if Quotient_VERSION_MINOR > 9
|
||||
#include <Quotient/thread.h>
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <Kirigami/Platform/PlatformTheme>
|
||||
@@ -484,7 +487,11 @@ QList<MessageComponent> MessageContentModel::messageContentComponents(bool isEdi
|
||||
}
|
||||
|
||||
// If the event is already threaded the ThreadModel will handle displaying a chat bar.
|
||||
#if Quotient_VERSION_MINOR > 9
|
||||
if (isThreading && roomMessageEvent && !(roomMessageEvent->isThreaded() || m_room->threads().contains(roomMessageEvent->id()))) {
|
||||
#else
|
||||
if (isThreading && roomMessageEvent && roomMessageEvent->isThreaded()) {
|
||||
#endif
|
||||
newComponents += MessageComponent{MessageComponentType::ChatBar, QString(), {}};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user