medialab / hyphe-browser

Browser version of Hyphe (WIP)
GNU Affero General Public License v3.0
29 stars 4 forks source link

Refresh current webentity's metadata every minute or so? #195

Closed boogheta closed 3 years ago

boogheta commented 3 years ago

In order to trigger the actualize buttons (cf #165 & #194), it could be nice to get updates on the current webentity displayed in the current tab, so I propose to run a setInterval on declare_page for the current displayed tab every minute or two minutes. Be sure to start/stop it whenever switching tabs or changing the taburl

boogheta commented 3 years ago

@mydu I see you redeclare using the webentity homepage, I'm wondering if there a reason to use this instead of the current tab url?

mydu commented 3 years ago

@boogheta this re-dalare call interval is triggered everytime when a tab is assigned with a new webentity, I think it will do the same job if I change webentity.homepage to activeTab.url unless if this url happens to be in the state of redirection? But I can change this call when url is changed instead of webentity, which means it will declare more frequently?

boogheta commented 3 years ago

No I guess it works like this. I just felt like we might encouner weird border cases by declaring a url which is not the current one, but there's theoretically no reason that the homepage would belong to another webentity so this should work and is better if it triggers a bit less calls. Let's leave it at that