mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-07 10:40:10 +00:00
Slightly improved check of today birthdays suggestion.
This commit is contained in:
parent
384c540197
commit
3501e4f44d
@ -218,9 +218,7 @@ rpl::producer<Ui::SlideWrap<Ui::RpWidget>*> TopBarSuggestionValue(
|
||||
|
||||
return;
|
||||
} else if (session->premiumCanBuy()
|
||||
&& config->suggestionCurrent(kSugBirthdayContacts.utf8())
|
||||
&& (!session->data().knownBirthdaysToday()
|
||||
|| !session->data().knownBirthdaysToday()->size())) {
|
||||
&& config->suggestionCurrent(kSugBirthdayContacts.utf8())) {
|
||||
session->data().contactBirthdays(
|
||||
) | rpl::start_with_next(crl::guard(content, [=] {
|
||||
const auto users = session->data()
|
||||
|
@ -321,12 +321,12 @@ std::vector<int> AppConfig::getIntArray(
|
||||
|
||||
bool AppConfig::suggestionCurrent(const QString &key) const {
|
||||
if (key == u"BIRTHDAY_CONTACTS_TODAY"_q) {
|
||||
if (_dismissedSuggestions.contains(key)) {
|
||||
if (_dismissedSuggestions.contains(key)
|
||||
|| !_account->sessionExists()) {
|
||||
return false;
|
||||
} else {
|
||||
const auto known = _account->sessionExists()
|
||||
? _account->session().data().knownContactBirthdays()
|
||||
: std::vector<UserId>();
|
||||
const auto known
|
||||
= _account->session().data().knownBirthdaysToday();
|
||||
if (!known) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user