Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Have refresh timestamp on the subscriptions page update on an interval #5140

Open
3 tasks done
kommunarr opened this issue May 21, 2024 · 3 comments
Open
3 tasks done

Comments

@kommunarr
Copy link
Collaborator

Guidelines

  • I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
  • I have searched the documentation for information that matches the description of the feature request I want to file, without success.
  • This issue contains only one feature request.

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:

  1. How long should the interval be (e.g., 1 minute, 5 minutes)?
  2. Do we update the video / live / short / community post timestamps on that interval too for consistency?

My thoughts:

  1. 1 minute (makes sense, as the main discernible visual unit for the first hour, that it update on that basis)
  2. No, I think if it's just the refresh timestamps, that makes sense on it's own. I don't think we want to violate the long-standing idea of these timestamps being unchanging as of first load, especially when we don't do the same behavior on other views.

Alternatives Considered

  • Different answer for 1 and/or 2
  • Don't implement this feature

Issue Labels

ease of use improvement, improvement to existing feature

Additional Information

No response

@kommunarr kommunarr added the enhancement New feature or request label May 21, 2024
@kommunarr kommunarr changed the title [Feature Request]: Have time markers on the subscriptions page update on an interval [Feature Request]: Have refresh timestamp on the subscriptions page update on an interval May 21, 2024
@kommunarr kommunarr added the good first issue Good for newcomers label May 21, 2024
@H0onnn
Copy link

H0onnn commented May 21, 2024

I would like to resolve the issue if possible.

@efb4f5ff-1298-471a-8973-3d47447115dc

Hi @H0onnn just checking in. What is you current status on this?

@manohar-nalluri
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To assign
Development

No branches or pull requests

4 participants