mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
add wonky image loading
This commit is contained in:
@@ -51,6 +51,15 @@ void Cache::GetFileFromURL(std::string url, callback_type cb) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string Cache::GetPathIfCached(std::string url) {
|
||||
auto cache_path = m_tmp_path / SanitizeString(url);
|
||||
if (std::filesystem::exists(cache_path)) {
|
||||
return cache_path.string();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
// this just seems really yucky
|
||||
void Cache::CleanupFutures() {
|
||||
for (auto it = m_futures.begin(); it != m_futures.end();) {
|
||||
|
||||
Reference in New Issue
Block a user