| 1621 | } |
| 1622 | |
| 1623 | bool DocumentData::useStreamingLoader() const { |
| 1624 | if (size <= 0) { |
| 1625 | return false; |
| 1626 | } else if (const auto info = sticker()) { |
| 1627 | return info->isWebm(); |
| 1628 | } |
| 1629 | return isAnimation() |
| 1630 | || isVideoFile() |
| 1631 | || isAudioFile() |
| 1632 | || isVoiceMessage(); |
| 1633 | } |
| 1634 | |
| 1635 | bool DocumentData::canBeStreamed() const { |
| 1636 | return hasRemoteLocation() && supportsStreaming(); |
no test coverage detected