summaryrefslogtreecommitdiff
path: root/src/visited.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-16 08:33:35 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-16 08:33:35 +0200
commita50a01da45a8fb6a4d6ee419fc1ad240b1f0dee5 (patch)
treea9ad9bd8259034a95049f5432599b8497613dd32 /src/visited.h
parent25a3f4fc680fbfd5acdd77361194cd6a2244c8cc (diff)
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.
Diffstat (limited to 'src/visited.h')
-rw-r--r--src/visited.h11
1 files changed, 8 insertions, 3 deletions
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)
32iDeclareTypeConstruction(VisitedUrl) 32iDeclareTypeConstruction(VisitedUrl)
33 33
34struct Impl_VisitedUrl { 34struct Impl_VisitedUrl {
35 iString url; 35 iString url;
36 iTime when; 36 iTime when;
37 uint16_t flags;
38};
39
40enum iVisitedUrlFlag {
41 transient_VisitedUrlFlag = 0x1, /* redirected; don't show in history */
37}; 42};
38 43
39iDeclareType(Visited) 44iDeclareType(Visited)
@@ -44,7 +49,7 @@ void load_Visited (iVisited *, const char *dirPath);
44void save_Visited (const iVisited *, const char *dirPath); 49void save_Visited (const iVisited *, const char *dirPath);
45 50
46iTime urlVisitTime_Visited (const iVisited *, const iString *url); 51iTime urlVisitTime_Visited (const iVisited *, const iString *url);
47void visitUrl_Visited (iVisited *, const iString *url); /* adds URL to the visited URLs set */ 52void visitUrl_Visited (iVisited *, const iString *url, uint16_t visitFlags); /* adds URL to the visited URLs set */
48void removeUrl_Visited (iVisited *, const iString *url); 53void removeUrl_Visited (iVisited *, const iString *url);
49 54
50const iPtrArray * list_Visited (const iVisited *, size_t count); /* returns collected */ 55const iPtrArray * list_Visited (const iVisited *, size_t count); /* returns collected */