diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-16 08:33:35 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-16 08:33:35 +0200 |
commit | a50a01da45a8fb6a4d6ee419fc1ad240b1f0dee5 (patch) | |
tree | a9ad9bd8259034a95049f5432599b8497613dd32 /src/visited.h | |
parent | 25a3f4fc680fbfd5acdd77361194cd6a2244c8cc (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.h | 11 |
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) | |||
32 | iDeclareTypeConstruction(VisitedUrl) | 32 | iDeclareTypeConstruction(VisitedUrl) |
33 | 33 | ||
34 | struct Impl_VisitedUrl { | 34 | struct Impl_VisitedUrl { |
35 | iString url; | 35 | iString url; |
36 | iTime when; | 36 | iTime when; |
37 | uint16_t flags; | ||
38 | }; | ||
39 | |||
40 | enum iVisitedUrlFlag { | ||
41 | transient_VisitedUrlFlag = 0x1, /* redirected; don't show in history */ | ||
37 | }; | 42 | }; |
38 | 43 | ||
39 | iDeclareType(Visited) | 44 | iDeclareType(Visited) |
@@ -44,7 +49,7 @@ void load_Visited (iVisited *, const char *dirPath); | |||
44 | void save_Visited (const iVisited *, const char *dirPath); | 49 | void save_Visited (const iVisited *, const char *dirPath); |
45 | 50 | ||
46 | iTime urlVisitTime_Visited (const iVisited *, const iString *url); | 51 | iTime urlVisitTime_Visited (const iVisited *, const iString *url); |
47 | void visitUrl_Visited (iVisited *, const iString *url); /* adds URL to the visited URLs set */ | 52 | void visitUrl_Visited (iVisited *, const iString *url, uint16_t visitFlags); /* adds URL to the visited URLs set */ |
48 | void removeUrl_Visited (iVisited *, const iString *url); | 53 | void removeUrl_Visited (iVisited *, const iString *url); |
49 | 54 | ||
50 | const iPtrArray * list_Visited (const iVisited *, size_t count); /* returns collected */ | 55 | const iPtrArray * list_Visited (const iVisited *, size_t count); /* returns collected */ |