Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Minor fix to ensure the first page visited in a tab is persisted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cochrane committed Mar 11, 2018
1 parent 67098d8 commit b2d7a78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Traits/navigate/history.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ namespace Odysseus.Traits {
var prev_uri = web.uri;
var first = true; // Don't log session restoration!
web.load_changed.connect((evt) => {
if (evt == WebKit.LoadEvent.FINISHED && first) {
prev_uri = web.uri; first = false; return;
}
if (evt != WebKit.LoadEvent.FINISHED ||
web.uri.has_prefix("odysseus:") || web.uri.has_prefix("source:") ||
prev_uri == web.uri ||
web.title == "") return;
if (evt == WebKit.LoadEvent.FINISHED && first) {
prev_uri = web.uri; first = false; return;
}

var stmt = Database.parse("""INSERT INTO page_visit
(tab, uri, title, favicon, visited_at, referrer)
Expand Down

0 comments on commit b2d7a78

Please sign in to comment.