1) Lors de la navigation clavier, si le chargement automatique en bas de page est activé, il ne faut pas manuellement charger les nouveaux articles, sinon il y a des doublons.
2) Il faut d'abord changer d'article avant d'en charger des nouveaux.
Vite fait, et vite testé, mais semble marcher et corriger les bugs de doublons que je constatais en navigation clavier (les articles non-lus que je venais de lire se rechargeaient une 2ème fois).
En particulier en affichage mobile, il n'était pas facile de voir quelle
catégorie ou flux on était en train de lire. Ce patch l'affiche sur la
ligne du jours, avec une suggestion de style.
Paging now works even when many entries have the same date.
SQL speed could probably be improved by testing first on date, and then
on CONCAT.
Also, having an index on date would probably help too.
In the current SQL request with LIMIT, if many dates are identical, the
pagination may not work properly. Added a little more tolerance, but
will have to be solved better.
- jQuery updated from version 1.5.2 to 1.10.2 (checked that it is ok
with jQuery Migrate Plugin)
- Put hide_posts() first to avoid flashing content during load
- Big speed optimisation of init_img()
- Use a single on() delegated event (jQuery 1.7+) instead of all
per-article click events as described on http://api.jquery.com/on/
- Moved all the per-article click events to an outside function
init_stream_delegates() that is called only once even when new articles
are dynamically added. Much lighter approach, and does not require
unbinding events and rebinding them at each dynamic load.
- Side effect: corrected the bug of favourites and read/unread that were
not properly unbound during dynamic loading.
- Corrected a JavaScript error for auto_load_more when #load_more is not
visible and therefore does not have a position() defined.
This patch is to make search work again after the new SQL optimisations,
by removing some of the optimisations when searching is used.
Optimisation of search is left for some future work.
The whole base is indeed transfered from MySQL to PHP, which is not
good.
Big effect (on speed and memory), but few changes :-)
Drastically reduced the number of SQL requests needed (from 233 down to
8 to load the home page with my own data set = 140 feeds in 15
categories).
Drastically reduced the amount of data transferred from MySQL to PHP.
Provide better access to the link of the article, and allow
control-click on the title to e.g. open in a background tab, without
having to reach the little link icon on the far right.