mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Don't re-apply exactly the same custom chat wallpaper.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user