Fix copy share link for albums
This commit is contained in:
parent
4845a251c5
commit
4d29c3f775
1 changed files with 16 additions and 1 deletions
|
|
@ -1099,7 +1099,22 @@ QPointer<Ui::RpWidget> ShowForwardMessagesBox(
|
||||||
const auto isGame = firstItem->getMessageBot()
|
const auto isGame = firstItem->getMessageBot()
|
||||||
&& firstItem->media()
|
&& firstItem->media()
|
||||||
&& (firstItem->media()->game() != nullptr);
|
&& (firstItem->media()->game() != nullptr);
|
||||||
const auto canCopyLink = items.size() == 1 && (firstItem->hasDirectLink() || isGame);
|
const auto canCopyLink = [=] {
|
||||||
|
if (items.size() > 10) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto groupId = firstItem->groupId();
|
||||||
|
|
||||||
|
for (const auto item : history->owner().idsToItems(items)) {
|
||||||
|
if (groupId != item->groupId()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (firstItem->hasDirectLink() || isGame);
|
||||||
|
}();
|
||||||
|
|
||||||
auto hasMediaForGrouping = false;
|
auto hasMediaForGrouping = false;
|
||||||
|
|
||||||
if (items.size() > 1) {
|
if (items.size() > 1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue