summaryrefslogtreecommitdiff
path: root/src/history.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 14:11:57 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 14:11:57 +0200
commit610bd7f31399a292216f66832cca843fc69a10de (patch)
treea6458e91a33bdb162ba4df5c350ba8e319864c55 /src/history.c
parent7a0980fd58308f7333254a1276e6dd5072326d98 (diff)
iOS: Further tweaks for mobile
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/history.c b/src/history.c
index 59d515dc..6876d8e3 100644
--- a/src/history.c
+++ b/src/history.c
@@ -299,6 +299,18 @@ size_t cacheSize_History(const iHistory *d) {
299 return cached; 299 return cached;
300} 300}
301 301
302void clearCache_History(iHistory *d) {
303 lock_Mutex(d->mtx);
304 iForEach(Array, i, &d->recent) {
305 iRecentUrl *url = i.value;
306 if (url->cachedResponse) {
307 delete_GmResponse(url->cachedResponse);
308 url->cachedResponse = NULL;
309 }
310 }
311 unlock_Mutex(d->mtx);
312}
313
302size_t pruneLeastImportant_History(iHistory *d) { 314size_t pruneLeastImportant_History(iHistory *d) {
303 size_t delta = 0; 315 size_t delta = 0;
304 size_t chosen = iInvalidPos; 316 size_t chosen = iInvalidPos;