The redirect to the unread page after a manual refresh only, if new
items could be fetched and we where redirected to the subscriptions
page because of a former nothing_to_read.
Update the unread counter after refreshing either one feed or all feeds.
Redirect to unread if nothing_to_read is set, but unread items exists.
This could be the situation with the remember me function, when new items
are fetched while the browser was closed.
Only the unread counter is updated right know.
The AutoUpdate Feature is designed on the premise of don't wasting resources. A
distinction is made between updates when Miniflux is visible or hidden.
To determine the visibility status, the Page Visibility API is used. The API is
available starting with Chrome 33, Firefox 18 and IE10. [https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API]
As IE9 returns an undefined, it doesn't break the compatibility at least.
If Miniflux is visible, the unread counter on the web page is updated as soon as
a mismatch between the counter and the number of unread articles in the database
is found.
If Miniflux is hidden, the timestamp of the most recent article from each feed
is compared with the value from the last run. We have an update If the timestamp
of the latest article is greater than the stored one and the latest article is
unread. The web page title is updated with a ? symbol to notify the user and the
update check pauses till Miniflux gets visible again. If Miniflux gets visible
again, the number of unread articles is queried from the database, the unread
counter on the web page is updated and finally the ? symbol is removed from the
web page title.
This way I can use my fever API client to read new articles (or at least the
latest article) while Miniflux is hidden and as I've seen the new articles
already a new articles notification is prevented.
It's intentionally that the page does not reload automatically as long as
articles are visible. If I'm in hurry, I only scroll through the articles to
spot something interesting. Most of the time I don't reach the last article.
If the page is reloaded while I'm away, I would have to scan from the top again.
If we're on a nothing_to_read page and have unread articles in the database, a
redirect to the unread page will be done.
The default update check interval is 10 minutes and can be changed on the
settings page. A zero value disables the update check entirely.
fixes#213
Major benefit, beside a smaller file size, is the possibility to remove debug informations from the minified javascript.
make-js script:
- take care of any warnings and errors
- raise warning level to verbose
js/*
- switch to Array-Access Property Notation for external data (prevents renaming by the closure compiler)
Add feeds only once to the feed_ids array (feed model), drop now unused select-db action.
Use $_SESSION['loggedin'] in favour of $_SESSION['user'] to reflect which information we do
expect from this session variable. Add nothing else than a flag, which indicates a logged in
user, to $_SESSION['loggedin'].
It's not necessary to know the current user name, since we do only have one user
per database. Same for the language setting. The database defines the front-end language.
Resolves bug where the password gets stored in the $_SESSION['user'] after a remember_me
login.
- more flexibility and explicitly with the expected dataset
- use radio button to select unittest.db
- add tests:
- previous/next article with arrow key left/right
- no alerts are displayed by default
- alert is displayed on first feed page if feed has parsing error
- keyboard shortcuts are disabled with modifier keys shift, alt and control (except IE)
- display logic on subscription page
Check if a requested database can be selected. Error out if not.
This prevents automatic fallbacks to the default database.
Remove the authorized information from the session if a new database
gets selected.
Factor out logout function to reuse existing code.