mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +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
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/ayu_worker.h"
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -3322,6 +3323,13 @@ void ApiWrap::forwardMessages(
|
|||
if (shared && !--shared->requestsLeft) {
|
||||
shared->callback();
|
||||
}
|
||||
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
if (!settings->sendReadMessages && settings->markReadAfterPoll && history->lastMessage())
|
||||
{
|
||||
readHistory(history->lastMessage());
|
||||
}
|
||||
|
||||
finish();
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
if (idsCopy) {
|
||||
|
|
|
@ -57,6 +57,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QClipboard>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
class ShareBox::Inner final : public Ui::RpWidget {
|
||||
public:
|
||||
Inner(
|
||||
|
@ -1577,6 +1582,13 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
|||
show->hideLayer();
|
||||
}
|
||||
}
|
||||
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
if (!settings->sendReadMessages && settings->markReadAfterPoll && history->lastMessage())
|
||||
{
|
||||
readHistory(history->lastMessage());
|
||||
}
|
||||
|
||||
finish();
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
if (error.type() == u"VOICE_MESSAGES_FORBIDDEN"_q) {
|
||||
|
|
Loading…
Add table
Reference in a new issue