Commit Graph

8302 Commits (v2021.05)
 

Author SHA1 Message Date
Frans de Jonge 4afcca9d6e
Update translations for 2021.05 release (#7707) 3 years ago
zwim 31e6294315
[plugin] CoverImage: Use blksize for size of cached files (#7705) 3 years ago
NiLuJe ba00f3879d
ReaderHighlight: nil guard a few self.hold_pos accesses (#7700)
Fix #7698

That only leaves a single unguarded access in onUnhighlight
3 years ago
Martín Fdez ffd5b88c87 warn before downgrading APK. Prompt for download in the browser to get a notification 3 years ago
Martín Fdez 23b7bfe0ce move android specific bits outside OTAManager 3 years ago
NiLuJe 4b265bcd7a Allow ingoring the B288 feature bans, for debugging purposes. 3 years ago
NiLuJe f413cd15e8 PB: Unconditionally disable HW rotation on B288 SoCs
Apparently, it's even more broken than usual on some devices/FW combos.

Fix #7663
3 years ago
Frans de Jonge 529c681851
CloudStorage: log error (#7694)
References <https://github.com/koreader/koreader/issues/7688>.
3 years ago
hius07 834feef8cd
InputDialog: add 'Go to line' button (#7673) 3 years ago
NiLuJe e6027313e9 ConfigDialog: Gesture range needs to be a Geom
Regression since #7664
Fix #7681
3 years ago
NiLuJe 628aef2099 OTA: Unbreak exit code on Install
Regression since #7657
3 years ago
Martín Fernández c1892d2619
[chore] Move SDL check to the end of Device's probe function (#7682)
To avoid a few log lines on all platforms:

```
ffi.load: SDL2
ffi.load (warning): libSDL2.so: cannot open shared object file: No such file or directory
ffi.load: libSDL2-2.0.so
ffi.load (warning): libSDL2-2.0.so: cannot open shared object file: No such file or directory
ffi.load: libSDL2-2.0.so.0
ffi.load (warning): libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
```
3 years ago
Frans de Jonge feec47d982
[doc] Documentation stub for Dbg module (#7677)
Cf. <https://github.com/koreader/koreader/pull/7664#discussion_r631858784>.
3 years ago
Frans de Jonge 0ec74612db
Fix stupid typo (#7678)
I was still thinking about 341d6ac660 I suppose.

Hat tip to @yparitcher.
3 years ago
Frans de Jonge 11a22254d6
[doc] Fix random typo (#7676) 3 years ago
Frans de Jonge 7ac4f31d1f
Bump base (#7675)
With https://github.com/koreader/koreader-base/pull/1369 for #7664.

Also contains LuaJIT bump https://github.com/koreader/koreader-base/pull/1370
3 years ago
NiLuJe bb65a69193
Geom: nil guard a few rect methods (#7664)
We've managed to trip a few of those on dimen fields post-init but
pre-paintTo in a few weird coner-cases, a point at which dimen is often
nil.

ConfigDialog: Deal with that very thing in update()

Fix #7656
3 years ago
Frans de Jonge a3575134af
Fix docs (#7674)
See https://github.com/koreader/koreader/pull/7668#issuecomment-840404170
3 years ago
Frans de Jonge 341d6ac660
[plugin] Wallabag: different timeouts for API calls vs file downloads (#7668)
Fixes <https://github.com/koreader/koreader/issues/7650>.
3 years ago
poire-z f0ecbeb1d5
ReaderToc: option to show a dotted line (#7669)
A dotted line joining the ToC entry text to the
page number may make it easier to use.
(This replaces the menu item separator from d879062e.)
Also fix baselines aligment, which could be a bit off.
3 years ago
zwim a20cac6904
[chore] Remove dead code (#7665) 3 years ago
NiLuJe de6f2e84a3
FileManager/ReaderUI: Clarify the current instance accessor (#7658)
* FileManager/ReaderUI: Clarify the current instance accessor

Make it clearer that we actually store it in a *module/class* member, not an *instance* member.

Also, warn if there's a close/open mismatch.
3 years ago
Martín Fernández 939fcf7f0e
android: avoid downloading the APK again if there's one download in progress + fix signature error (#7657) 3 years ago
Martín Fernández 247166b3df
android: keep bundled version in a dedicated text file (#7649) 3 years ago
Hzj_jie 1a08f2cb69
Plugins: adds PluginMenuInserter helper (#7419)
Allows user-plugins to register themselves
into "More tools" menu.
3 years ago
zwim d082f795e6
Dispatcher: some formatting cleanup, rewording and re-ordering 3 years ago
NiLuJe 1dd300d822 Bump base
https://github.com/koreader/koreader-base/pull/1368
3 years ago
NiLuJe 1ffbd8760d KOPTInterface: Minor optimization when hashing the configurable status
Use a table & table.concat instead of individual concats.
And then use that same table for every hash-related operation.

(Nothing else uses the configurable hash function, otherwise I'd have
limited the table shenanigans to the function itself).
3 years ago
NiLuJe 48c474e245 Device: Add some more logging in onPowerEvent
Could possibly help shed some light on potential SleepCover races...
re #7633
3 years ago
NiLuJe 2635593890 Cache: Some more tweaks after #7624
* Allow doing away with CacheItem
  Now that we have working FFI finalizers on BBs, it's mostly useless overhead.
  We only keep it for DocCache, because it's slightly larger, and memory pressure might put us in a do or die situation where waiting for the GC might mean an OOM kill.
* Expose's LRU slot-only mode
  And use it for CatalogCache, which doesn't care about storage space
* Make GlyphCache slots only (storage space is insignificant here, it was
  always going to be evicted by running out of slots).
* More informative warning when we chop the cache in half
3 years ago
NiLuJe 05806abeaa CreDocument Call Cache: Minor modernization tweaks
* Neuter timekeeping when statistics are disabled
  Saves a few syscalls ;).
* Port to ffi/lru
  Only a tiny bit of it actually requires any sort of LRU logic, so it's fairly painless.
* Release the cache on close
* Use string.buffer to serialize function arguments
  Ought to be faster than the custom approach ;).
  (Still requires wrapping them in a table, though).
  It's much less human-readable, but then again, this doesn't need to be :).
3 years ago
NiLuJe ed0aa1ed11 ReaderUI: Ensure we flash when opening a document
Regression since #7624
3 years ago
Frans de Jonge 310151fac9
Fix typo (#7655)
Follow-up to #7632.
3 years ago
Martín Fernández d303fdf694
android: Prompt for install updates when they're downloaded (#7632) 3 years ago
hius07 3d713dc34c
Dictionary: disable 'Clean history' when the history is empty (#7636) 3 years ago
hius07 c129354ca3
Wikipedia: disable 'Clean history' when the history is empty (#7637) 3 years ago
hius07 170629c921
[plugin] Text editor: new 'Clean text editor history' etc. (#7635) 3 years ago
mergen3107 2c1cae64b6
Remove notification on font change (#7589)
Should reduce refreshes competition and avoid glitches.
3 years ago
zwim 46a2d9c145
Dispatcher: Make font size actions consistent with ConfigDialog's NumberPicker (#7626) 3 years ago
Kevin Reuning 1cefd27946
DropboxAPI: Handle pagination (#7621)
Fix #7600 

Co-authored-by: NiLuJe <ninuje@gmail.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
3 years ago
hius07 752ec49c6f
FM: Make "Refresh content" an actual Event/Gesture (#7592)
* And enable it by default in the FM as the "hold on top-right corner" Gesture, instead of the onHold handler of the "+" button.
3 years ago
zwim 3d9ed32458
Android: Send Suspend/Resume Events on STOP/START (#7630)
* ReaderHeader: Refresh it *now* on Resume, instead of just re-scheduling an update if auto-refresh is enabled..
3 years ago
NiLuJe a9977b3453 Bump base
https://github.com/koreader/koreader-base/pull/1365
https://github.com/koreader/koreader-base/pull/1366
https://github.com/koreader/koreader-base/pull/1364
3 years ago
NiLuJe 7cb480c0fc Calibre: Invalidate the Search cache after a Wireless session
xref: https://www.mobileread.com/forums/showthread.php?t=338810
3 years ago
NiLuJe 06a273b48d Port ffiUtil.getTimestamp users to TimeVal:now()
They were all using it to compute durations,
something which is going to be more sensible
from a monotonic clock source.
3 years ago
NiLuJe 21b067792d Cache: Rewrite based on lua-lru
Ought to be faster than our naive array-based approach.
Especially for the glyph cache, which has a solid amount of elements,
and is mostly cache hits.
(There are few things worse for performance in Lua than
table.remove @ !tail and table.insert @ !tail, which this was full of :/).

DocCache: New module that's now an actual Cache instance instead of a
weird hack. Replaces "Cache" (the instance) as used across Document &
co.
Only Cache instance with on-disk persistence.

ImageCache: Update to new Cache.

GlyphCache: Update to new Cache.
Also, actually free glyph bbs on eviction.
3 years ago
NiLuJe ce624be8b8 Cache: Fix a whole lot of things.
* Minor updates to the min & max cache sizes (16 & 64MB). Mostly to satisfy my power-of-two OCD.
  * Purge broken on-disk cache files
  * Optimize free RAM computations
  * Start dropping LRU items when running low on memory before pre-rendring (hinting) pages in non-reflowable documents.
  * Make serialize dump the most recently *displayed* page, as the actual MRU item is the most recently *hinted* page, not the current one.
  * Use more accurate item size estimations across the whole codebase.

TileCacheItem:

  * Drop lua-serialize in favor of Persist.

KoptInterface:

  * Drop lua-serialize in favor of Persist.
  * Make KOPTContext caching actually work by ensuring its hash is stable.
3 years ago
NiLuJe e7acec1526 ReaderUI: Saner FM/RD lifecycle
* Ensure that going from one to the other tears down the former and
    its plugins before instantiating the latter and its plugins.

UIManager: Unify Event sending & broadcasting
  * Make the two behave the same way (walk the widget stack from top to
    bottom), and properly handle the window stack shrinking shrinking
    *and* growing.
    Previously, broadcasting happened bottom-to-top and didn't really
    handle the list shrinking/growing, while sending only handled the list
    shrinking by a single element, and hopefully that element being the one
    the event was just sent to.

These two items combined allowed us to optimize suboptimal
refresh behavior with Menu and other Menu classes when
opening/closing a document.
e.g., the "opening document" Notification is now properly regional,
and the "open last doc" option no longer flashes like a crazy person
anymore.

Plugins: Allow optimizing Menu refresh with custom menus, too.

Requires moving Menu's close_callback *after* onMenuSelect, which, eh,
probably makes sense, and is probably harmless in the grand scheme of
things.
3 years ago
NiLuJe 47cc7bb1a6 AutoTurn: Get rid of the weird settings_id hack, and use sane
schedule/unschedule pairs, like AutoSuspend.
3 years ago
NiLuJe 03d85bbf99 Terminal: Read settings at instantiation time, not loading time 3 years ago