2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Apply ignore_restriction_reasons from config.

This commit is contained in:
John Preston
2019-12-09 16:57:33 +03:00
parent 431b7445c3
commit 41e13e39bc
13 changed files with 127 additions and 43 deletions

View File

@@ -81,13 +81,15 @@ void UserData::setPhoto(const MTPUserProfilePhoto &photo) {
}
}
QString UserData::unavailableReason() const {
return _unavailableReason;
auto UserData::unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & {
return _unavailableReasons;
}
void UserData::setUnavailableReason(const QString &text) {
if (_unavailableReason != text) {
_unavailableReason = text;
void UserData::setUnavailableReasons(
std::vector<Data::UnavailableReason> &&reasons) {
if (_unavailableReasons != reasons) {
_unavailableReasons = std::move(reasons);
Notify::peerUpdatedDelayed(
this,
Notify::PeerUpdate::Flag::UnavailableReasonChanged);