mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Removed ttl menu for deleted accounts.
This commit is contained in:
parent
21c647147a
commit
aac21e1f71
2 changed files with 8 additions and 2 deletions
|
@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_peer.h"
|
||||
#include "data/data_user.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "main/main_session.h"
|
||||
#include "menu/menu_ttl.h"
|
||||
|
@ -104,7 +105,8 @@ Args TTLValidator::createArgs() const {
|
|||
bool TTLValidator::can() const {
|
||||
return (_peer->isUser()
|
||||
&& !_peer->isSelf()
|
||||
&& !_peer->isNotificationsUser())
|
||||
&& !_peer->isNotificationsUser()
|
||||
&& !_peer->asUser()->isInaccessible())
|
||||
|| (_peer->isChat()
|
||||
&& _peer->asChat()->canDeleteMessages())
|
||||
|| (_peer->isChannel()
|
||||
|
|
|
@ -637,7 +637,11 @@ void Filler::addReport() {
|
|||
|
||||
void Filler::addNewContact() {
|
||||
const auto user = _peer->asUser();
|
||||
if (!user || user->isContact() || user->isSelf() || user->isBot()) {
|
||||
if (!user
|
||||
|| user->isContact()
|
||||
|| user->isSelf()
|
||||
|| user->isInaccessible()
|
||||
|| user->isBot()) {
|
||||
return;
|
||||
}
|
||||
const auto controller = _controller;
|
||||
|
|
Loading…
Add table
Reference in a new issue