Don't re-apply exactly the same custom chat wallpaper.
This commit is contained in:
parent
40deda1e9b
commit
81f40586a3
|
@ -590,6 +590,12 @@ void BackgroundPreviewBox::uploadForPeer() {
|
|||
void BackgroundPreviewBox::setExistingForPeer(const Data::WallPaper &paper) {
|
||||
Expects(_forPeer != nullptr);
|
||||
|
||||
if (const auto already = _forPeer->wallPaper()) {
|
||||
if (already->equals(paper)) {
|
||||
_controller->finishChatThemeEdit(_forPeer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const auto api = &_controller->session().api();
|
||||
using Flag = MTPmessages_SetChatWallPaper::Flag;
|
||||
api->request(MTPmessages_SetChatWallPaper(
|
||||
|
|
Loading…
Reference in New Issue