mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix memory clearing from photos/documents.
This commit is contained in:
@@ -2880,6 +2880,10 @@ TaskId startImageLoad(const StorageKey &location, mtpFileLoader *loader) {
|
||||
std::make_unique<ImageLoadTask>(j->first, location, loader));
|
||||
}
|
||||
|
||||
bool willImageLoad(const StorageKey &location) {
|
||||
return _imagesMap.constFind(location) != _imagesMap.cend();
|
||||
}
|
||||
|
||||
int32 hasImages() {
|
||||
return _imagesMap.size();
|
||||
}
|
||||
@@ -3024,6 +3028,10 @@ bool copyAudio(const StorageKey &oldLocation, const StorageKey &newLocation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool willAudioLoad(const StorageKey &location) {
|
||||
return _audiosMap.constFind(location) != _audiosMap.cend();
|
||||
}
|
||||
|
||||
int32 hasAudios() {
|
||||
return _audiosMap.size();
|
||||
}
|
||||
@@ -3130,6 +3138,10 @@ TaskId startWebFileLoad(const QString &url, webFileLoader *loader) {
|
||||
std::make_unique<WebFileLoadTask>(j->first, url, loader));
|
||||
}
|
||||
|
||||
bool willWebFileLoad(const QString &url) {
|
||||
return _webFilesMap.constFind(url) != _webFilesMap.cend();
|
||||
}
|
||||
|
||||
int32 hasWebFiles() {
|
||||
return _webFilesMap.size();
|
||||
}
|
||||
|
Reference in New Issue
Block a user