Warn on changed sticker, only if set_id is still the same.
GitOrigin-RevId: 756c3c0ea8b40ce5c96dc72281961f1de9bd2453
This commit is contained in:
parent
c1555a0693
commit
0e77a35b0a
@ -1774,9 +1774,9 @@ bool StickersManager::merge_stickers(FileId new_id, FileId old_id, bool can_dele
|
|||||||
Sticker *new_ = new_it->second.get();
|
Sticker *new_ = new_it->second.get();
|
||||||
CHECK(new_ != nullptr);
|
CHECK(new_ != nullptr);
|
||||||
|
|
||||||
if (old_->alt != new_->alt || old_->set_id != new_->set_id ||
|
if (old_->set_id == new_->set_id && (old_->alt != new_->alt || old_->set_id != new_->set_id ||
|
||||||
(!old_->is_animated && !new_->is_animated && old_->dimensions.width != 0 && old_->dimensions.height != 0 &&
|
(!old_->is_animated && !new_->is_animated && old_->dimensions.width != 0 &&
|
||||||
old_->dimensions != new_->dimensions)) {
|
old_->dimensions.height != 0 && old_->dimensions != new_->dimensions))) {
|
||||||
LOG(ERROR) << "Sticker has changed: alt = (" << old_->alt << ", " << new_->alt << "), set_id = (" << old_->set_id
|
LOG(ERROR) << "Sticker has changed: alt = (" << old_->alt << ", " << new_->alt << "), set_id = (" << old_->set_id
|
||||||
<< ", " << new_->set_id << "), dimensions = (" << old_->dimensions << ", " << new_->dimensions << ")";
|
<< ", " << new_->set_id << "), dimensions = (" << old_->dimensions << ", " << new_->dimensions << ")";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user