GNOME Bugzilla – Bug 722825
Update the recent place added time on re-visit
Last modified: 2014-01-24 11:28:45 UTC
Right now we have a limit on the number of recent visited places. When that limit is hit we remove the oldest place. We do not update the time of visit of a place if the place is re-visited. So when the recent places limit is hit the place removed might be a place you visited very recently. I will post a patch series that keeps placeStore sorted by added time and makes sure we update the added time when a place is re-visited.
Created attachment 267034 [details] [review] placeStore: sort store by ascending added time
Created attachment 267035 [details] [review] placeStore: do not throw exception in store
Created attachment 267036 [details] [review] Update recent added time on re-visit
Review of attachment 267034 [details] [review]: ack
Review of attachment 267035 [details] [review]: ack
Review of attachment 267036 [details] [review]: ::: src/placeStore.js @@ +208,3 @@ + }, + + _updateAddTime: function(place) { Would go for: _updateAddedTime instead but up to you @@ +216,3 @@ + model.set_value(iter, Columns.ADDED, updated); + this._dirty = true; + this.store(); btw, I don't think we need this _dirty. We seem to be always setting it before calling store() and its only use is that store() ensures its true. Oh and store() doesn't unset it, which I imagine it should (if we keep _dirty for some reason).
Review of attachment 267036 [details] [review]: ::: src/placeStore.js @@ +216,3 @@ + model.set_value(iter, Columns.ADDED, updated); + this._dirty = true; + this.store(); I actually removed it already in git master. Feel free to reintroduce it if its needed.
Attachment 267034 [details] pushed as 8fcb33d - placeStore: sort store by ascending added time Attachment 267035 [details] pushed as fcf7d96 - placeStore: do not throw exception in store Attachment 267036 [details] pushed as accbfcf - Update recent added time on re-visit