mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 00:46:08 +00:00
Support 18+/restrictions for messages.
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "data/data_user.h"
|
||||
|
||||
#include "api/api_sensitive_content.h"
|
||||
#include "storage/localstorage.h"
|
||||
#include "storage/storage_user_photos.h"
|
||||
#include "main/main_session.h"
|
||||
@@ -117,14 +118,9 @@ auto UserData::unavailableReasons() const
|
||||
return _unavailableReasons;
|
||||
}
|
||||
|
||||
void UserData::setUnavailableReasons(
|
||||
void UserData::setUnavailableReasonsList(
|
||||
std::vector<Data::UnavailableReason> &&reasons) {
|
||||
if (_unavailableReasons != reasons) {
|
||||
_unavailableReasons = std::move(reasons);
|
||||
session().changes().peerUpdated(
|
||||
this,
|
||||
UpdateFlag::UnavailableReason);
|
||||
}
|
||||
_unavailableReasons = std::move(reasons);
|
||||
}
|
||||
|
||||
void UserData::setCommonChatsCount(int count) {
|
||||
@@ -516,6 +512,10 @@ void UserData::setBirthday(Data::Birthday value) {
|
||||
if (_birthday != value) {
|
||||
_birthday = value;
|
||||
session().changes().peerUpdated(this, UpdateFlag::Birthday);
|
||||
|
||||
if (isSelf()) {
|
||||
session().api().sensitiveContent().reload(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user