Skip to content

Add Miniflux recipe #628

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

makinori
Copy link

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

Added a recipe for Miniflux RSS reader

https://miniflux.app/

@makinori
Copy link
Author

I don't know if I should add this to webview.js, but it might be a good idea to reload the page occasionally as Miniflux doesn't automatically fetch new posts. Any ideas?

@Alphrag
Copy link
Member

Alphrag commented Apr 18, 2025

That is a very good point about the auto-refresh. However, I would not go with it that way, since it means that if a user is browsing something, the reader to refresh automatically on them and they have to search again what they were reading.
I guess that users should then either refresh manually when they are on it and want to check if there are any new elements, or use the service with the hibernation and wake up strategy, since then it will indeed reload from time to time without hindering what they are doing. What do you think?

@makinori
Copy link
Author

Is there a way to check if the user is currently looking at the service? Could use that to prevent the refresh.

@Alphrag
Copy link
Member

Alphrag commented Apr 18, 2025

That could be an idea indeed. At the moment, there is no way to know from the webview of a service if it is in view (though the app knows that). The way I see it (but I don't fully understand the whole codebase yet), you would need to modify the app itself, in order to add a function in RecipeWebview.ts, say isServiceOnFocus(serviceId), that you would then call in the webview of this recipe to do what you need about this.
Now the actual implementation of this function might need to use the ipcRenderer to send an event to the main app, from where you will then be able to check the isActive value of the Service this belongs to or compare it with the currently active service (which can be read among others from this.ferdium.stores.services.active.id). You can take example on the clearStorageData function to see how the different components talk to each other.

@makinori
Copy link
Author

Was able to figure out a way to do this using blur and focus events. If you open the service dev tools and reload whilst focused or unfocused, the timeout will set accordingly and adjust when active changes.

@makinori
Copy link
Author

I realized it would make more sense to only reload when the user isn't reading an entry or in settings

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

Successfully merging this pull request may close these issues.

2 participants