Add error display on link sharing.

This commit is contained in:
John Preston 2021-03-12 22:38:30 +04:00
parent ce84d9c84d
commit bbeb9d3950
4 changed files with 6 additions and 6 deletions

View File

@ -570,13 +570,13 @@ void LeaveBox(
void ConfirmBox(
not_null<Ui::GenericBox*> box,
const QString &text,
const TextWithEntities &text,
rpl::producer<QString> button,
Fn<void()> callback) {
box->addRow(
object_ptr<Ui::FlatLabel>(
box.get(),
text,
rpl::single(text),
st::groupCallBoxLabel),
st::boxPadding);
if (callback) {

View File

@ -34,7 +34,7 @@ void LeaveBox(
void ConfirmBox(
not_null<Ui::GenericBox*> box,
const QString &text,
const TextWithEntities &text,
rpl::producer<QString> button,
Fn<void()> callback);

View File

@ -825,7 +825,7 @@ void GroupPanel::addMembers() {
};
auto box = Box(
Group::ConfirmBox,
text,
TextWithEntities{ text },
tr::lng_participant_invite(),
[=] { inviteWithAdd(users, nonMembers, finishWithConfirm); });
*shared = box.data();

View File

@ -149,8 +149,8 @@ object_ptr<ShareBox> ShareInviteLinkBox(
}
text.append(error.first);
if (const auto weak = *box) {
//weak->getDelegate()->show(
// Box(ConfirmBox, text, nullptr, nullptr));
weak->getDelegate()->show(
Box(ConfirmBox, text, nullptr, nullptr));
}
return;
}