mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Removed username from public data members of ChannelData.
This commit is contained in:
@@ -847,7 +847,7 @@ SetupChannelBox::SetupChannelBox(
|
||||
this,
|
||||
st::setupChannelLink,
|
||||
nullptr,
|
||||
channel->username,
|
||||
channel->username(),
|
||||
channel->session().createInternalLink(QString()))
|
||||
, _checkTimer([=] { check(); }) {
|
||||
}
|
||||
@@ -1176,7 +1176,7 @@ void SetupChannelBox::check() {
|
||||
)).done([=](const MTPBool &result) {
|
||||
_checkRequestId = 0;
|
||||
_errorText = (mtpIsTrue(result)
|
||||
|| _checkUsername == _channel->username)
|
||||
|| _checkUsername == _channel->username())
|
||||
? QString()
|
||||
: tr::lng_create_channel_link_occupied(tr::now);
|
||||
_goodText = _errorText.isEmpty()
|
||||
@@ -1238,7 +1238,7 @@ SetupChannelBox::UsernameResult SetupChannelBox::parseError(
|
||||
|
||||
void SetupChannelBox::updateFail(UsernameResult result) {
|
||||
if ((result == UsernameResult::Ok)
|
||||
|| (_sentUsername == _channel->username)) {
|
||||
|| (_sentUsername == _channel->username())) {
|
||||
_channel->setName(
|
||||
TextUtilities::SingleLine(_channel->name()),
|
||||
TextUtilities::SingleLine(_sentUsername));
|
||||
@@ -1272,7 +1272,7 @@ void SetupChannelBox::checkFail(UsernameResult result) {
|
||||
_errorText = tr::lng_create_channel_link_invalid(tr::now);
|
||||
update();
|
||||
} else if ((result == UsernameResult::Occupied)
|
||||
&& _checkUsername != _channel->username) {
|
||||
&& _checkUsername != _channel->username()) {
|
||||
_errorText = tr::lng_create_channel_link_occupied(tr::now);
|
||||
update();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user