mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Don't re-apply exactly the same custom chat wallpaper.
This commit is contained in:
parent
40deda1e9b
commit
81f40586a3
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue