|
|
|
@ -39,7 +39,8 @@ EventStore::EventStore(std::string room_id, QObject *) |
|
|
|
|
this->last = range->last; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
connect(this, |
|
|
|
|
connect( |
|
|
|
|
this, |
|
|
|
|
&EventStore::eventFetched, |
|
|
|
|
this, |
|
|
|
|
[this](std::string id, |
|
|
|
@ -55,7 +56,8 @@ EventStore::EventStore(std::string room_id, QObject *) |
|
|
|
|
}, |
|
|
|
|
Qt::QueuedConnection); |
|
|
|
|
|
|
|
|
|
connect(this, |
|
|
|
|
connect( |
|
|
|
|
this, |
|
|
|
|
&EventStore::oldMessagesRetrieved, |
|
|
|
|
this, |
|
|
|
|
[this](const mtx::responses::Messages &res) { |
|
|
|
@ -79,8 +81,7 @@ EventStore::EventStore(std::string room_id, QObject *) |
|
|
|
|
auto range = cache::client()->getTimelineRange(room_id_); |
|
|
|
|
|
|
|
|
|
if (range && range->last - range->first != 0) { |
|
|
|
|
emit beginInsertRows( |
|
|
|
|
0, int(range->last - range->first)); |
|
|
|
|
emit beginInsertRows(0, int(range->last - range->first)); |
|
|
|
|
this->first = range->first; |
|
|
|
|
this->last = range->last; |
|
|
|
|
emit endInsertRows(); |
|
|
|
@ -156,7 +157,8 @@ EventStore::EventStore(std::string room_id, QObject *) |
|
|
|
|
event->data); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
connect(this, |
|
|
|
|
connect( |
|
|
|
|
this, |
|
|
|
|
&EventStore::messageFailed, |
|
|
|
|
this, |
|
|
|
|
[this](std::string txn_id) { |
|
|
|
@ -176,7 +178,8 @@ EventStore::EventStore(std::string room_id, QObject *) |
|
|
|
|
}, |
|
|
|
|
Qt::QueuedConnection); |
|
|
|
|
|
|
|
|
|
connect(this, |
|
|
|
|
connect( |
|
|
|
|
this, |
|
|
|
|
&EventStore::messageSent, |
|
|
|
|
this, |
|
|
|
|
[this](std::string txn_id, std::string event_id) { |
|
|
|
@ -361,7 +364,7 @@ struct overloaded : Ts... |
|
|
|
|
using Ts::operator()...; |
|
|
|
|
}; |
|
|
|
|
template<class... Ts> |
|
|
|
|
overloaded(Ts...)->overloaded<Ts...>; |
|
|
|
|
overloaded(Ts...) -> overloaded<Ts...>; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|