mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: read after forward
This commit is contained in:
parent
a73da65253
commit
6d08b5bf23
2 changed files with 20 additions and 0 deletions
|
@ -87,6 +87,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
// AyuGram includes
|
// AyuGram includes
|
||||||
#include "ayu/ayu_settings.h"
|
#include "ayu/ayu_settings.h"
|
||||||
#include "ayu/ayu_worker.h"
|
#include "ayu/ayu_worker.h"
|
||||||
|
#include "ayu/utils/telegram_helpers.h"
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -3322,6 +3323,13 @@ void ApiWrap::forwardMessages(
|
||||||
if (shared && !--shared->requestsLeft) {
|
if (shared && !--shared->requestsLeft) {
|
||||||
shared->callback();
|
shared->callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto settings = &AyuSettings::getInstance();
|
||||||
|
if (!settings->sendReadMessages && settings->markReadAfterPoll && history->lastMessage())
|
||||||
|
{
|
||||||
|
readHistory(history->lastMessage());
|
||||||
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=](const MTP::Error &error) {
|
||||||
if (idsCopy) {
|
if (idsCopy) {
|
||||||
|
|
|
@ -57,6 +57,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
|
||||||
|
// AyuGram includes
|
||||||
|
#include "ayu/ayu_settings.h"
|
||||||
|
#include "ayu/utils/telegram_helpers.h"
|
||||||
|
|
||||||
|
|
||||||
class ShareBox::Inner final : public Ui::RpWidget {
|
class ShareBox::Inner final : public Ui::RpWidget {
|
||||||
public:
|
public:
|
||||||
Inner(
|
Inner(
|
||||||
|
@ -1577,6 +1582,13 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
||||||
show->hideLayer();
|
show->hideLayer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto settings = &AyuSettings::getInstance();
|
||||||
|
if (!settings->sendReadMessages && settings->markReadAfterPoll && history->lastMessage())
|
||||||
|
{
|
||||||
|
readHistory(history->lastMessage());
|
||||||
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=](const MTP::Error &error) {
|
||||||
if (error.type() == u"VOICE_MESSAGES_FORBIDDEN"_q) {
|
if (error.type() == u"VOICE_MESSAGES_FORBIDDEN"_q) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue