mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Support invite link label editing.
This commit is contained in:
@@ -1180,6 +1180,7 @@ void EditLink(
|
||||
peer->session().api().inviteLinks().create(
|
||||
peer,
|
||||
finish,
|
||||
result.label,
|
||||
result.expireDate,
|
||||
result.usageLimit,
|
||||
result.requestApproval);
|
||||
@@ -1188,6 +1189,7 @@ void EditLink(
|
||||
peer,
|
||||
data.admin,
|
||||
result.link,
|
||||
result.label,
|
||||
result.expireDate,
|
||||
result.usageLimit,
|
||||
result.requestApproval,
|
||||
@@ -1202,6 +1204,7 @@ void EditLink(
|
||||
Ui::EditInviteLinkBox,
|
||||
Fields{
|
||||
.link = data.link,
|
||||
.label = data.label,
|
||||
.expireDate = data.expireDate,
|
||||
.usageLimit = data.usageLimit,
|
||||
.requestApproval = data.requestApproval,
|
||||
|
@@ -275,6 +275,7 @@ void Row::update(const InviteLinkData &data, TimeId now) {
|
||||
_progressTillExpire = ComputeProgress(data, now);
|
||||
_color = ComputeColor(data, _progressTillExpire);
|
||||
setCustomStatus(ComputeStatus(data, now));
|
||||
refreshName(st::inviteLinkList.item);
|
||||
_delegate->rowUpdateRow(this);
|
||||
}
|
||||
|
||||
@@ -309,6 +310,9 @@ crl::time Row::updateExpireIn() const {
|
||||
}
|
||||
|
||||
QString Row::generateName() {
|
||||
if (!_data.label.isEmpty()) {
|
||||
return _data.label;
|
||||
}
|
||||
auto result = _data.link;
|
||||
return result.replace(
|
||||
qstr("https://"),
|
||||
|
Reference in New Issue
Block a user