This was an ugly workaround the need for which went away when BacklogManager was introduced.
Anyway, setData() with the FlagsRole was ignored by MessageModelItem...
Message::Flags flags = (Message::Flags)idx.data(ChatLineModel::FlagsRole).toInt();
if(flags.testFlag(Message::Backlog) || flags.testFlag(Message::Self))
continue;
Message::Flags flags = (Message::Flags)idx.data(ChatLineModel::FlagsRole).toInt();
if(flags.testFlag(Message::Backlog) || flags.testFlag(Message::Self))
continue;
- flags |= Message::Backlog; // we only want to trigger a highlight once!
- Client::messageModel()->setData(idx, (int)flags, ChatLineModel::FlagsRole);
BufferId bufId = idx.data(ChatLineModel::BufferIdRole).value<BufferId>();
BufferInfo::Type bufType = Client::networkModel()->bufferType(bufId);
BufferId bufId = idx.data(ChatLineModel::BufferIdRole).value<BufferId>();
BufferInfo::Type bufType = Client::networkModel()->bufferType(bufId);