Fixed ability to cancel of loading video as part of grouped media.

This commit is contained in:
23rd 2025-01-09 22:40:37 +03:00
parent 522e45ce92
commit 41985c0a5f

View file

@ -1488,8 +1488,13 @@ TextState Gif::getStateGrouped(
if (!geometry.contains(point)) {
return {};
}
if (fullFeaturedGrouped(sides)) {
if (const auto state = cornerStatusTextState(point, request, geometry.topLeft()); state.link) {
const auto isFullFeaturedGrouped = fullFeaturedGrouped(sides);
if (isFullFeaturedGrouped) {
const auto state = cornerStatusTextState(
point,
request,
geometry.topLeft());
if (state.link) {
return state;
}
}
@ -1500,10 +1505,12 @@ TextState Gif::getStateGrouped(
? _cancell
: _realParent->isSending()
? nullptr
: (dataLoaded() || _dataMedia->canBePlayed(_realParent))
: dataLoaded()
? _openl
: _data->loading()
: (_data->loading() && !isFullFeaturedGrouped)
? _cancell
: _dataMedia->canBePlayed(_realParent)
? _openl
: _savel;
return TextState(_parent, std::move(link));
}