diff --git a/Telegram/SourceFiles/boxes/background_preview_box.cpp b/Telegram/SourceFiles/boxes/background_preview_box.cpp index 3573a261ef..2c3167e13b 100644 --- a/Telegram/SourceFiles/boxes/background_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/background_preview_box.cpp @@ -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(