mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
parent
f0645753d4
commit
85b94bc6fd
2 changed files with 7 additions and 2 deletions
|
@ -249,6 +249,9 @@ void DeleteMessagesBox::prepare() {
|
|||
tr::lng_delete_for_me_chat_hint(tr::now, lt_count, count)
|
||||
});
|
||||
} else if (!peer->isSelf()) {
|
||||
if (const auto user = peer->asUser(); user && user->isBot()) {
|
||||
_revokeForBot = true;
|
||||
}
|
||||
appendDetails({
|
||||
tr::lng_delete_for_me_hint(tr::now, lt_count, count)
|
||||
});
|
||||
|
@ -466,7 +469,7 @@ void DeleteMessagesBox::keyPressEvent(QKeyEvent *e) {
|
|||
}
|
||||
|
||||
void DeleteMessagesBox::deleteAndClear() {
|
||||
const auto revoke = _revoke ? _revoke->checked() : false;
|
||||
const auto revoke = _revoke ? _revoke->checked() : _revokeForBot;
|
||||
const auto session = _session;
|
||||
const auto invokeCallbackAndClose = [&] {
|
||||
// deleteMessages can initiate closing of the current section,
|
||||
|
|
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include "boxes/abstract_box.h"
|
||||
#include "ui/layers/box_content.h"
|
||||
|
||||
namespace Main {
|
||||
class Session;
|
||||
|
@ -69,6 +69,8 @@ private:
|
|||
bool _moderateBan = false;
|
||||
bool _moderateDeleteAll = false;
|
||||
|
||||
bool _revokeForBot = false;
|
||||
|
||||
object_ptr<Ui::FlatLabel> _text = { nullptr };
|
||||
object_ptr<Ui::Checkbox> _revoke = { nullptr };
|
||||
object_ptr<Ui::Checkbox> _banUser = { nullptr };
|
||||
|
|
Loading…
Add table
Reference in a new issue