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

Adds keyboard shortcut for refreshing all feeds #672

Merged
merged 2 commits into from May 27, 2020

Conversation

pellegrino
Copy link
Contributor

Implemented a feature that I'm using on my personal deployment.

  • Binds the 'R' key to trigger a refresh in the background for all
    feeds.
  • Updates the locale, using the same description as the link in the
    feeds page.

- Binds the 'R' key to trigger a refresh in the background for all
feeds.
- Updates the locale, using the same description as the link in the
feeds page.
@@ -167,11 +167,24 @@ function markEntryAsRead(element) {
}
}

// Send the Ajax request to refresh all feeds in the background
function handleRefreshAllFeeds() {
let url = "/feeds/refresh";
Copy link
Member

Choose a reason for hiding this comment

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

Hardcoding the URL should be avoided because some people are running Miniflux within a subfolder. You could do the same thing as the function below:

let url = document.body.dataset.refreshAllFeedsUrl;

And let the router generate the URL by updating the body element in layout.html.

This change lets the router generate the refresh all feeds endpoint url,
instead of hardcoding the URL.
@pellegrino
Copy link
Contributor Author

Thanks for your pointers! It helped me to navigate the code. I did the changes you mentioned! Any further improvements you would like to see? Cheers!

@fguillot fguillot merged commit 7fb0bdc into miniflux:master May 27, 2020
@fguillot
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants