mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Allow removing cloud wallpapers.
This commit is contained in:
@@ -3093,6 +3093,13 @@ void Session::setWallpapers(const QVector<MTPWallPaper> &data, int32 hash) {
|
||||
}
|
||||
}
|
||||
|
||||
void Session::removeWallpaper(const WallPaper &paper) {
|
||||
const auto i = ranges::find(_wallpapers, paper.id(), &WallPaper::id);
|
||||
if (i != end(_wallpapers)) {
|
||||
_wallpapers.erase(i);
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<WallPaper> &Session::wallpapers() const {
|
||||
return _wallpapers;
|
||||
}
|
||||
|
@@ -539,6 +539,7 @@ public:
|
||||
}
|
||||
|
||||
bool updateWallpapers(const MTPaccount_WallPapers &data);
|
||||
void removeWallpaper(const WallPaper &paper);
|
||||
const std::vector<WallPaper> &wallpapers() const;
|
||||
int32 wallpapersHash() const;
|
||||
|
||||
|
Reference in New Issue
Block a user