Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

clear the lastAccessedTime for all tags when clearing history #3620

Merged
merged 1 commit into from
Aug 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,12 @@ module.exports.cleanAppData = (data, isShutdown) => {
if (data.sites) {
const clearHistory = isShutdown && getSetting(settings.SHUTDOWN_CLEAR_HISTORY) === true
if (clearHistory) {
// TODO - this should the history methods from siteUtils
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't understand this todo, maybe missing a word use

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's hard to form complete sentences sometimes

data.sites = data.sites.filter((site) => site && site.tags && site.tags.length)
data.sites = data.sites.map((site) => {
delete site.lastAccessedTime
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it save to delete it instead of setting to 0? /cc @bsclifton

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clear modal and context menu in about:history set the value to null, but this works too. Verified by cherry picking into my branch and manually testing 👍

return site
})
}
}
if (data.downloads) {
Expand Down