mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 16:03:03 +02:00
fix: copy sticker owner ID if not found
This commit is contained in:
parent
3be793032f
commit
29d1f1f14a
2 changed files with 6 additions and 8 deletions
|
@ -791,7 +791,7 @@ void StickerSetBox::updateButtons() {
|
|||
searchById(
|
||||
innerId,
|
||||
session,
|
||||
[session, weak](const QString &username, UserData *user)
|
||||
[session, weak, innerId](const QString &username, UserData *user)
|
||||
{
|
||||
if (!weak) {
|
||||
return;
|
||||
|
@ -803,7 +803,8 @@ void StickerSetBox::updateButtons() {
|
|||
}
|
||||
|
||||
if (!user) {
|
||||
strongInner->showToast(tr::ayu_UserNotFoundMessage(tr::now));
|
||||
QGuiApplication::clipboard()->setText(QString::number(innerId));
|
||||
strongInner->showToast(tr::ayu_IDCopiedToast(tr::now));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1524,8 +1524,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
const auto idText = IDString(user);
|
||||
if (!idText.isEmpty()) {
|
||||
QGuiApplication::clipboard()->setText(idText);
|
||||
const auto msg = tr::ayu_IDCopiedToast(tr::now);
|
||||
controller->showToast(msg);
|
||||
controller->showToast(tr::ayu_IDCopiedToast(tr::now));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
@ -1660,8 +1659,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
const auto idText = IDString(peer);
|
||||
if (!idText.isEmpty()) {
|
||||
QGuiApplication::clipboard()->setText(idText);
|
||||
const auto msg = tr::ayu_IDCopiedToast(tr::now);
|
||||
controller->showToast(msg);
|
||||
controller->showToast(tr::ayu_IDCopiedToast(tr::now));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
@ -1685,8 +1683,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
const auto idText = IDString(peer->forumTopicFor(topicRootId)->topicRootId());
|
||||
if (!idText.isEmpty()) {
|
||||
QGuiApplication::clipboard()->setText(idText);
|
||||
const auto msg = tr::ayu_IDCopiedToast(tr::now);
|
||||
controller->showToast(msg);
|
||||
controller->showToast(tr::ayu_IDCopiedToast(tr::now));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue