2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 15:15:13 +00:00

Pause all media if a call is created.

Pause video, voice messages, songs and stop video messages.
This commit is contained in:
John Preston
2017-05-12 20:44:18 +03:00
parent 040ee90aec
commit 565b56fb5f
9 changed files with 59 additions and 9 deletions

View File

@@ -2645,15 +2645,28 @@ namespace {
void stopGifItems() {
if (!::gifItems.isEmpty()) {
GifItems gifs = ::gifItems;
for (GifItems::const_iterator i = gifs.cbegin(), e = gifs.cend(); i != e; ++i) {
if (HistoryMedia *media = i.value()->getMedia()) {
auto gifs = ::gifItems;
for_const (auto item, gifs) {
if (auto media = item->getMedia()) {
media->stopInline();
}
}
}
}
void stopRoundVideoPlayback() {
if (!::gifItems.isEmpty()) {
auto gifs = ::gifItems;
for_const (auto item, gifs) {
if (auto media = item->getMedia()) {
if (media->isRoundVideoPlaying()) {
media->stopInline();
}
}
}
}
}
QString phoneFromSharedContact(int32 userId) {
auto i = ::sharedContactItems.constFind(userId);
if (i != ::sharedContactItems.cend() && !i->isEmpty()) {