From b2d7a78751c75dba662d66bcaae2fd834a7e3dae Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Mon, 12 Mar 2018 11:40:43 +1300 Subject: [PATCH] Minor fix to ensure the first page visited in a tab is persisted. --- src/Traits/navigate/history.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Traits/navigate/history.vala b/src/Traits/navigate/history.vala index 135503c..7a34a4f 100644 --- a/src/Traits/navigate/history.vala +++ b/src/Traits/navigate/history.vala @@ -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)