Better condition to skip merge of GIF and MP4 animations.

This commit is contained in:
levlam 2021-08-03 03:13:56 +03:00
parent 13d5854e2f
commit f8ab675ad1

View File

@ -312,7 +312,7 @@ bool AnimationsManager::merge_animations(FileId new_id, FileId old_id, bool can_
if (old_->thumbnail != new_->thumbnail) {
// LOG_STATUS(td_->file_manager_->merge(new_->thumbnail.file_id, old_->thumbnail.file_id));
}
if (old_->mime_type == "image/gif" && new_->mime_type == "video/mp4") {
if (new_->file_name.size() == old_->file_name.size() + 4 && new_->file_name == old_->file_name + ".mp4") {
need_merge = false;
}
}