mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
support for hidden read receipts
This commit is contained in:
parent
9cb5f317c6
commit
05f7e47a9f
2 changed files with 16 additions and 8 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "EventAccessors.h"
|
#include "EventAccessors.h"
|
||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
#include "MatrixClient.h"
|
#include "MatrixClient.h"
|
||||||
|
#include "UserSettingsPage.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(Reaction)
|
Q_DECLARE_METATYPE(Reaction)
|
||||||
|
@ -220,11 +221,14 @@ EventStore::EventStore(std::string room_id, QObject *)
|
||||||
}
|
}
|
||||||
|
|
||||||
http::client()->read_event(
|
http::client()->read_event(
|
||||||
room_id_, event_id, [this, event_id](mtx::http::RequestErr err) {
|
room_id_,
|
||||||
|
event_id,
|
||||||
|
[this, event_id](mtx::http::RequestErr err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
nhlog::net()->warn("failed to read_event ({}, {})", room_id_, event_id);
|
nhlog::net()->warn("failed to read_event ({}, {})", room_id_, event_id);
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
!UserSettings::instance()->readReceipts());
|
||||||
|
|
||||||
auto idx = idToIndex(event_id);
|
auto idx = idToIndex(event_id);
|
||||||
|
|
||||||
|
|
|
@ -1077,12 +1077,16 @@ TimelineModel::setCurrentIndex(int index)
|
||||||
void
|
void
|
||||||
TimelineModel::readEvent(const std::string &id)
|
TimelineModel::readEvent(const std::string &id)
|
||||||
{
|
{
|
||||||
http::client()->read_event(room_id_.toStdString(), id, [this](mtx::http::RequestErr err) {
|
http::client()->read_event(
|
||||||
|
room_id_.toStdString(),
|
||||||
|
id,
|
||||||
|
[this](mtx::http::RequestErr err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
nhlog::net()->warn(
|
nhlog::net()->warn(
|
||||||
"failed to read_event ({}, {})", room_id_.toStdString(), currentId.toStdString());
|
"failed to read_event ({}, {})", room_id_.toStdString(), currentId.toStdString());
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
!UserSettings::instance()->readReceipts());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
|
Loading…
Reference in a new issue