mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-08-02 10:53:02 +02:00
fix: don't increment channel views
This commit is contained in:
parent
4940d85b29
commit
64b824671a
1 changed files with 7 additions and 1 deletions
|
@ -15,6 +15,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history_item.h"
|
||||
#include "main/main_session.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
|
||||
namespace Api {
|
||||
namespace {
|
||||
|
||||
|
@ -83,6 +87,8 @@ void ViewsManager::pollExtendedMedia(
|
|||
}
|
||||
|
||||
void ViewsManager::viewsIncrement() {
|
||||
const auto &settings = AyuSettings::getInstance();
|
||||
|
||||
for (auto i = _toIncrement.begin(); i != _toIncrement.cend();) {
|
||||
if (_incrementRequests.contains(i->first)) {
|
||||
++i;
|
||||
|
@ -97,7 +103,7 @@ void ViewsManager::viewsIncrement() {
|
|||
const auto requestId = _api.request(MTPmessages_GetMessagesViews(
|
||||
i->first->input,
|
||||
MTP_vector<MTPint>(ids),
|
||||
MTP_bool(true)
|
||||
MTP_bool(settings.sendReadMessages)
|
||||
)).done([=](
|
||||
const MTPmessages_MessageViews &result,
|
||||
mtpRequestId requestId) {
|
||||
|
|
Loading…
Add table
Reference in a new issue