do not update history while syncing

This commit is contained in:
Lionel Dricot 2022-01-31 15:32:34 +01:00
parent ed81c3245f
commit 6b0c362b5e
1 changed files with 4 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ you'll be able to transparently follow links to Gopherspace!""")
# Update state
self.gi = gi
if update_hist:
if update_hist and not self.sync_only:
self._update_history(gi)
@ -1477,6 +1477,9 @@ you'll be able to transparently follow links to Gopherspace!""")
print(self._format_geminiitem(n+offset+1, gi, url))
def _update_history(self, gi):
# We never update while in sync_only
if self.sync_only:
return
# We dont add lists to history
if not gi or os.path.join(_DATA_DIR,"lists") in gi.url:
return