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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user