Open kommunarr opened 5 months ago
I would like to resolve the issue if possible.
Hi @H0onnn just checking in. What is you current status on this?
Hi,I am working on this and usually i came across some problem Usally i have changed the state logic to the children javascript getLastRefreshTimestamp: { type: Function, default: (_) => true }
as a prop
updateLastRefreshTimestamp: function() {
this.lastRefreshTimestamp = this.getLastRefreshTimestamp()
},
startTimer: function() {
if (this.timmerId) {
clearInterval(this.timmerId)
this.timmerId = null
}
this.timmerId = setInterval(() => { this.updateLastRefreshTimestamp() }, 60000)
},
methods to update the state so its work fine with every widget but problem when the refresh is clicked that too only in most popular it takes some time while fetching the data but i am updating it click: function() { this.$emit('click') setTimeout(()=>{this.fetchLastRefreshTimestamp()},3000) }
immediately after the click so it is not immediately updating it updates based on setInterval so for this i need to keep state in parent so is there any best practices i can do it improve it any suggestions i am new to this kind of stuff any help regarding it
Guidelines
Problem Description
Sometimes I leave FreeTube on in the background and like to see how long it's been since my last refresh. The problem is that the top bar doesn't refresh with the newest relative timestamp, so I have to switch to a new tab and back again to see the updated timestamp.
Proposed Solution
Using
setInterval
, have the refresh widget timestamp update on an interval. Some questions that could take this feature into different directions:My thoughts:
Alternatives Considered
Issue Labels
ease of use improvement, improvement to existing feature
Additional Information
No response