From a50a01da45a8fb6a4d6ee419fc1ad240b1f0dee5 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 16 Nov 2020 08:33:35 +0200 Subject: Remember redirected URLs as visited "visited.txt" will now remember URLs that were redirects, but those are not shown in the UI as part of the history. This fixes the issue where redirected URLs were not being shown as visited links in the UI. Beware if downgrading Lagrange: URLs in the history will get prefixed with "0000 ". Might be a good idea to switch to a forwards compatible format like JSON for these files. --- src/visited.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/visited.h') diff --git a/src/visited.h b/src/visited.h index 5a34d008..d9eb02b6 100644 --- a/src/visited.h +++ b/src/visited.h @@ -32,8 +32,13 @@ iDeclareType(VisitedUrl) iDeclareTypeConstruction(VisitedUrl) struct Impl_VisitedUrl { - iString url; - iTime when; + iString url; + iTime when; + uint16_t flags; +}; + +enum iVisitedUrlFlag { + transient_VisitedUrlFlag = 0x1, /* redirected; don't show in history */ }; iDeclareType(Visited) @@ -44,7 +49,7 @@ void load_Visited (iVisited *, const char *dirPath); void save_Visited (const iVisited *, const char *dirPath); iTime urlVisitTime_Visited (const iVisited *, const iString *url); -void visitUrl_Visited (iVisited *, const iString *url); /* adds URL to the visited URLs set */ +void visitUrl_Visited (iVisited *, const iString *url, uint16_t visitFlags); /* adds URL to the visited URLs set */ void removeUrl_Visited (iVisited *, const iString *url); const iPtrArray * list_Visited (const iVisited *, size_t count); /* returns collected */ -- cgit v1.2.3