2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Removed username from public data members of ChannelData.

This commit is contained in:
23rd
2022-10-05 13:40:31 +03:00
committed by John Preston
parent 38f5cda800
commit 9b7329b378
8 changed files with 33 additions and 19 deletions

View File

@@ -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 {