|
|
@ -224,6 +224,7 @@ TimelineModel::roleNames() const |
|
|
|
{Id, "id"}, |
|
|
|
{Id, "id"}, |
|
|
|
{State, "state"}, |
|
|
|
{State, "state"}, |
|
|
|
{IsEncrypted, "isEncrypted"}, |
|
|
|
{IsEncrypted, "isEncrypted"}, |
|
|
|
|
|
|
|
{IsRoomEncrypted, "isRoomEncrypted"}, |
|
|
|
{ReplyTo, "replyTo"}, |
|
|
|
{ReplyTo, "replyTo"}, |
|
|
|
{Reactions, "reactions"}, |
|
|
|
{Reactions, "reactions"}, |
|
|
|
{RoomId, "roomId"}, |
|
|
|
{RoomId, "roomId"}, |
|
|
@ -350,6 +351,9 @@ TimelineModel::data(const QString &id, int role) const |
|
|
|
return std::holds_alternative< |
|
|
|
return std::holds_alternative< |
|
|
|
mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(events[id]); |
|
|
|
mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(events[id]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
case IsRoomEncrypted: { |
|
|
|
|
|
|
|
return cache::isRoomEncrypted(room_id_.toStdString()); |
|
|
|
|
|
|
|
} |
|
|
|
case ReplyTo: |
|
|
|
case ReplyTo: |
|
|
|
return QVariant(QString::fromStdString(in_reply_to_event(event))); |
|
|
|
return QVariant(QString::fromStdString(in_reply_to_event(event))); |
|
|
|
case Reactions: |
|
|
|
case Reactions: |
|
|
@ -387,6 +391,7 @@ TimelineModel::data(const QString &id, int role) const |
|
|
|
m.insert(names[Id], data(id, static_cast<int>(Id))); |
|
|
|
m.insert(names[Id], data(id, static_cast<int>(Id))); |
|
|
|
m.insert(names[State], data(id, static_cast<int>(State))); |
|
|
|
m.insert(names[State], data(id, static_cast<int>(State))); |
|
|
|
m.insert(names[IsEncrypted], data(id, static_cast<int>(IsEncrypted))); |
|
|
|
m.insert(names[IsEncrypted], data(id, static_cast<int>(IsEncrypted))); |
|
|
|
|
|
|
|
m.insert(names[IsRoomEncrypted], data(id, static_cast<int>(IsRoomEncrypted))); |
|
|
|
m.insert(names[ReplyTo], data(id, static_cast<int>(ReplyTo))); |
|
|
|
m.insert(names[ReplyTo], data(id, static_cast<int>(ReplyTo))); |
|
|
|
m.insert(names[RoomName], data(id, static_cast<int>(RoomName))); |
|
|
|
m.insert(names[RoomName], data(id, static_cast<int>(RoomName))); |
|
|
|
m.insert(names[RoomTopic], data(id, static_cast<int>(RoomTopic))); |
|
|
|
m.insert(names[RoomTopic], data(id, static_cast<int>(RoomTopic))); |
|
|
|