mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 00:15:42 +00:00
Fix caption editing in grouped media.
This commit is contained in:
@@ -67,6 +67,7 @@ EditCaptionBox::EditCaptionBox(
|
|||||||
if (const auto photo = media->getPhoto()) {
|
if (const auto photo = media->getPhoto()) {
|
||||||
dimensions = QSize(photo->full->width(), photo->full->height());
|
dimensions = QSize(photo->full->width(), photo->full->height());
|
||||||
image = photo->full;
|
image = photo->full;
|
||||||
|
_photo = true;
|
||||||
} else if (const auto doc = media->getDocument()) {
|
} else if (const auto doc = media->getDocument()) {
|
||||||
dimensions = doc->dimensions;
|
dimensions = doc->dimensions;
|
||||||
image = doc->thumb;
|
image = doc->thumb;
|
||||||
|
@@ -449,6 +449,10 @@ bool HistoryGroupedMedia::needsBubble() const {
|
|||||||
return _needBubble;
|
return _needBubble;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HistoryGroupedMedia::canEditCaption() const {
|
||||||
|
return main()->canEditCaption();
|
||||||
|
}
|
||||||
|
|
||||||
bool HistoryGroupedMedia::computeNeedBubble() const {
|
bool HistoryGroupedMedia::computeNeedBubble() const {
|
||||||
if (!_caption.isEmpty()) {
|
if (!_caption.isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
|
@@ -108,6 +108,7 @@ public:
|
|||||||
bool customInfoLayout() const override {
|
bool customInfoLayout() const override {
|
||||||
return _caption.isEmpty();
|
return _caption.isEmpty();
|
||||||
}
|
}
|
||||||
|
bool canEditCaption() const override;
|
||||||
bool allowsFastShare() const override {
|
bool allowsFastShare() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user