git ssb

10+

Matt McKegg / patchwork



Commit 8c781ef5dd08dd3ad321614199ef07f2e066c3ec

don't destroy default views after timeout

Matt McKegg committed on 2/17/2017, 1:14:52 PM
Parent: e53edca084bc70ef3f036ee0684009ae71da41df

Files changed

main-window.jschanged
main-window.jsView
@@ -57,14 +57,17 @@
5757 // '/notifications': renderPage('/notifications')
5858 })
5959
6060 var lastViewed = {}
61 + var defaultViews = views.keys()
6162
6263 // delete cached view after 30 mins of last seeing
6364 setInterval(() => {
6465 views.keys().forEach((view) => {
65- if (lastViewed[view] !== true && Date.now() - lastViewed[view] > (30 * 60e3) && view !== currentView()) {
66- views.delete(view)
66 + if (!defaultViews.includes(view)) {
67 + if (lastViewed[view] !== true && Date.now() - lastViewed[view] > (5 * 60e3) && view !== currentView()) {
68 + views.delete(view)
69 + }
6770 }
6871 })
6972 }, 60e3)
7073

Built with git-ssb-web