From 33f2c2b1d29731f890d3835032d911610e4fc69d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 16 May 2018 12:02:40 +0200 Subject: Unload content if it's not visible on the screen for a while --- include/Cache.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/Cache.hpp b/include/Cache.hpp index 311658b..fc702a7 100644 --- a/include/Cache.hpp +++ b/include/Cache.hpp @@ -1,5 +1,6 @@ #pragma once +#include "types.hpp" #include #include #include @@ -7,6 +8,7 @@ #include #include #include +#include namespace TinyProcessLib { @@ -50,6 +52,7 @@ namespace dchat Type type; CachedType cachedType; + i64 lastAccessed; }; class Cache @@ -79,6 +82,7 @@ namespace dchat }; std::thread downloadWaitThread; + std::thread checkContentAccessTimeThread; std::vector imageDownloadProcesses; std::vector imageDownloadProcessesQueue; std::mutex imageDownloadMutex; -- cgit v1.2.3