2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Allow removing cloud wallpapers.

This commit is contained in:
John Preston
2019-02-09 16:36:07 +03:00
parent f9d56eb4c1
commit b6e37b7730
7 changed files with 210 additions and 39 deletions

View File

@@ -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;
}