mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Hide login code with a spoiler in chats list.
This commit is contained in:
@@ -856,6 +856,10 @@ Manager::DisplayOptions Manager::getNotificationOptions(
|
||||
&& (!topic || !Data::CanSendTexts(topic)))
|
||||
|| peer->isBroadcast()
|
||||
|| (peer->slowmodeSecondsLeft() > 0);
|
||||
result.spoilerLoginCode = item
|
||||
&& !item->out()
|
||||
&& peer->isNotificationsUser()
|
||||
&& Core::App().isSharingScreen();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1167,7 +1171,9 @@ void NativeManager::doShowNotification(NotificationFields &&fields) {
|
||||
? tr::lng_forward_messages(tr::now, lt_count, fields.forwardedCount)
|
||||
: item->groupId()
|
||||
? tr::lng_in_dlg_album(tr::now)
|
||||
: TextWithPermanentSpoiler(item->notificationText());
|
||||
: TextWithPermanentSpoiler(item->notificationText({
|
||||
.spoilerLoginCode = options.spoilerLoginCode,
|
||||
}));
|
||||
|
||||
// #TODO optimize
|
||||
auto userpicView = item->history()->peer->createUserpicView();
|
||||
|
Reference in New Issue
Block a user