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

@@ -339,13 +339,14 @@ bool ChannelData::isGroupAdmin(not_null<UserData*> user) const {
return false;
}
QString ChannelData::unavailableReason() const {
return _unavailableReason;
auto ChannelData::unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & {
return _unavailableReasons;
}
void ChannelData::setUnavailableReason(const QString &text) {
if (_unavailableReason != text) {
_unavailableReason = text;
void ChannelData::setUnavailableReasons(std::vector<Data::UnavailableReason> &&reasons) {
if (_unavailableReasons != reasons) {
_unavailableReasons = std::move(reasons);
Notify::peerUpdatedDelayed(
this,
Notify::PeerUpdate::Flag::UnavailableReasonChanged);