2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

469 Commits

Author SHA1 Message Date
hius07
e5fb836a81
ReaderFooter: improve (#12243) 2024-08-01 13:11:28 +03:00
Benoit Pierre
99d45d7584 djvu: honor render mode when reflowing 2024-07-19 21:32:20 +02:00
Benoit Pierre
36154f4747
tests/opds: fix no longer valid feedbooks.com URLs (#12185) 2024-07-19 18:58:32 +02:00
Benoit Pierre
99447414dc
mupdf: update to 1.24.2 (#11940)
Depends on https://github.com/koreader/koreader-base/pull/1805.

Closes:
- #5422 
- #9927
- #10879
2024-06-01 13:22:02 +02:00
Benoit Pierre
5a465f413b tweaks for new build system
- forward unknown make targets to base
- add `cmake` and `staging` directories to ignored output artifacts
- drop `package.path` and `package.cpath` luarocks specific entries
2024-05-29 22:02:06 +02:00
SomeGuy
e859109885
Status bar: major UI makeover (#11678) 2024-05-21 21:13:53 +02:00
Benoit Pierre
075edf9980 tests/readerhighlight: speedup
Reduce time to run those tests by 74% on my machine (~8.8s → ~2.3s).
2024-05-09 14:04:57 +02:00
Benoit Pierre
554e8daf99 tests/readerhighlight: avoid changing versioned files
Work on a copy of `test/sample.pdf`.
2024-05-09 14:04:57 +02:00
Benoit Pierre
089c19cb39 tests/readerbookmark: avoid changing versioned files
Work on a copy of `test/sample.pdf`.
2024-05-09 14:04:57 +02:00
Benoit Pierre
3e809b6c7b tests/readerlink: speedup
Reduce time to run those tests by 95% on my machine (~17s → 0.8s).
2024-05-09 14:04:57 +02:00
Benoit Pierre
fdf19e98c3 tests/readerlink: factorize setup/teardown code 2024-05-09 14:04:57 +02:00
Benoit Pierre
d0ca04c48d tests/readerlink: reorganize
Group tests by file type (EPUB or PDF).
2024-05-09 14:04:57 +02:00
Benoit Pierre
b67c6147d5 tests: ensure successive testsuite runs work
Don't carry over some old settings. Additionally, avoid clobbering the standard reader settings.
2024-05-09 14:04:57 +02:00
Benoit Pierre
821120828b
tests: fix EPUB test (#11776)
The `droid sans fallback` test incorrectly assumes `Droid Sans Mono`
will be the first font in the list of fallback fonts, but the list
is alphabetically sorted.

Cf. https://github.com/koreader/koreader/pull/10566
2024-05-08 20:03:40 +02:00
hius07
d82815952e
Annotations, part 1 (#11563)
New format to handle annotations (page bookmarks, highlights, notes) and store them in the book metadata files.
2024-05-03 09:08:57 +03:00
hugleo
b026f84949
ReaderZooming: make auto-crop default be page content (#11438) 2024-03-14 00:15:10 +01:00
NiLuJe
33b54f5574
Kindle: Add a hasLightSensor devcap, and use it in the AutoFrontlight plugin (#11255)
Add the Scribe to the list while we're there
2023-12-24 17:15:30 +01:00
hius07
aabd6d7a26
File browser, Collection: improve group actions (#11178)
Maintain correct records in History and Favorites when moving/deleting folders or group of files.
Optimize Collection module to minimize storage requests.
2023-12-10 08:05:34 +02:00
NiLuJe
9af3e95d9d Kindle: Fix a smattering of frontlight bugs
* afterResume had *two* different implementations, so the historical one
  that handled frontlight fixups no longer ran
  (regression since #10426)
* isFrontlightOn was completely broken, for a couple of reasons:
  * There was no is isFrontlightOnHW implementation, so when it ran, it
    mostly always thought the frontlight was on, because
    self.fl_intensity doesn't change on toggle off.
  * _decideFrontlightState was never called on Kindle,
    so isFrontlightOnHW was never really called, making isFrontlightOn
    completely useless. Call it in setIntensityHW's coda, as it ought to
    be. And properly document that.

Generic *was* calling _decideFrontlightState is setIntensity, but
*before* actually setting the frontlight, which makes no goddamn sense,
so get rid of that, too.

* Also fix frontlight toggle notifications (regression since #10305)

TL;DR: The PowerD API being a mess strikes again.
2023-11-25 20:53:36 +01:00
Wim de With
17a4aa962f
Fix connection bug with non-ASCII SSIDs in wpa_supplicant (#11089)
* Bump base

includes:

koreader/koreader-base#1691
koreader/koreader-base#1692
koreader/koreader-base#1689
koreader/koreader-base#1690
koreader/koreader-base#1693

* Integrate decoding of SSIDs within wpa_supplicant

The UTF-8 decoding of SSIDs is specific to wpa_supplicant. In this
patch, we move all of this decoding logic to the wpa_supplicant module.
We expose the raw bytes of the SSID to the NetworkMgr code, and make
sure to always fix bad UTF-8 before we display the SSID to the user.

Within the wpa_supplicant module, we replace the call to the
wpa_passphrase binary to get the PSK with a direct function call to
OpenSSL. This allows us to calculate the PSK over any arbitrary bytes,
including UTF-8. In the same vein, we use the hex-encoded SSID to
communicate with wpa_supplicant when setting up the network to support
arbitrary bytes in the SSID.

Unfortunately, we also remove the tests, as there is no way to unit test
local functions.
2023-11-09 21:08:26 +01:00
hius07
b70f866656
DocSettings (again) (#11020)
Cleaning and optimizing Docsettings code.
2023-10-31 07:30:39 +02:00
hius07
2ed2c2c23d
md5: centralize and deduplicate (#11003)
Document partial md5 hash is calculated by util.partialMD5() and stored in doc_settings as "partial_md5_checksum" on the first document opening.
2023-10-15 07:47:09 +03:00
poire-z
5ec736ae96 ReaderToc: rework getChapterPageCount/Left/Done()
Rework the way they are computed, fixing issues with hidden
flows when they don't coincide with chapter starts.
2023-10-09 00:15:05 +02:00
Benoit Pierre
8f6fae81fa
tests: tag tests relying on a working internet access (#10939)
So they can easily be filtered-out when offline.
2023-09-24 18:18:03 +02:00
Wim de With
599a3034ca
NetworkManager: Decode SSID to UTF-8 (#10864)
wpa_supplicant returns all non-ASCII SSIDs as raw bytes in the form
\x0a. We interpret these bytes as UTF-8, and make sure that all invalid
characters are replaced with a �.
2023-08-31 19:29:30 +02:00
NiLuJe
a15fc0e9a5 Revert "Test: Fiw readerhighlight test"
This reverts commit c23c422f62.
2023-08-15 21:24:11 +02:00
NiLuJe
66d2930e5e Revert "Tests: "Unbreak" some more tests"
This reverts commit f4dd0f92b2.
2023-08-15 21:24:11 +02:00
NiLuJe
e63c613626 Tests: "Unbreak" some more tests
This is horrible and needs to burn in a fire.
2023-08-15 21:24:11 +02:00
NiLuJe
ae7e2f14aa Test: Fiw readerhighlight test
With actual ReaderUI teardowns, and fix the overlapping highlight
handling, so we can drop the nocov flags
2023-08-15 21:24:11 +02:00
NiLuJe
55534fcec2 ReaderView: Keep the terrible readerhilight_spec test happy
This thing is a horrible mess.
2023-08-15 21:24:11 +02:00
NiLuJe
22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
2023-08-15 21:24:11 +02:00
NiLuJe
d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
2023-07-12 02:42:16 +02:00
Benoit Pierre
346d8eb83e
Decrease fonts memory use (#10618)
Instead of opening the same font multiple times for each different
size (multiple face instances), share one face instance and create
multiple size instances.
2023-07-04 09:13:16 +02:00
poire-z
a4720b44cd Text search: various Kopt search fixes
- Properly parse input text for words (the previous
  code wasn't working with Greek letters)
- With multiple words search, don't allow "substring
  matching" for words in the middle
- Remove support for Lua pattens, so to get proper
  substring matching (as we have with cre text search)
2023-07-04 09:03:34 +02:00
Benoit Pierre
f661726fef tests: fix listing tests with busted --list 2023-07-04 08:12:07 +02:00
Benoit Pierre
fdd645af73 tests: minor cleanup 2023-07-04 08:12:07 +02:00
hius07
dee1c902ec
ReaderUI: minor optimization (#10634) 2023-07-03 17:43:13 +03:00
Benoit Pierre
c95b17410b
tests: fix EPUB test (#10566)
Otherwise the test fail in my environment because of some user fonts.
2023-06-11 22:20:46 +02:00
Frans de Jonge
f7d633cc3d
readerhighlight_spec: add #nocov to some highlight tests (#10559)
The problem stems from <https://github.com/koreader/koreader/pull/10492> but we need the translations to go through.
2023-06-09 22:14:41 +02:00
hius07
66b661b726
Update readerhighlight_spec.lua (#10515) 2023-05-31 18:57:01 +03:00
hius07
57f4ff2c68
ReaderHighlight: manage overlapped highlights (#10492) 2023-05-28 08:05:48 +03:00
NiLuJe
7e98b9de4b
PM: Minor refactor to suspend/resume code flow (#10426)
Make sure we only send Suspend/Resume events when we *actually* suspend/resume. This is done via the Device `_beforeSuspend`/`_afterResume` methods, and those were called by the *input handlers*, not the PM logic; which means they would fire, while the PM logic could actually take a smarter decision and *not* do what the event just sent implied ;).

(i.e., sleep with a cover -> suspend + actual suspend, OK; but if you then resume with a button -> input assumes resume, but PM will actually suspend again!).

Existing design issue made more apparent by #9448 ;).

Also fixes/generalizes a few corner-cases related to screen_saver_lock handling (e.g., don't allow USBMS during a lock).

And deal with the fallout of the main change to the Kobo frontlight ramp behavior ;).
2023-05-18 23:13:43 +02:00
yparitcher
1102c030fa
Kindle: toggle cover events
Allow disabling the hall efect sensor via the sysfs knob, so the kindle system wont sleep & wake the device

for those of use that stay in koreader, are caseless and have get spurious wakeups
2023-05-03 10:26:35 -04:00
kpopconnoisseur
0533ec46d8
kindle voyage: no framework: whispertouch button activation
kindle: "no framework" voyage page turn buttons
kindle: update device tests
2023-05-02 21:59:33 -04:00
yparitcher
64b0f5e7cf ReaderFooter: separate ToggleFooterMode from TapFooter
the footer can be toggled by gestures and menu, and should only be locked or skim in flipping mode when the footer is tapped

also allow toggling when only displaying the progress bar

rename to TapFooter to show it is not an event

Fixes: #10355
2023-05-01 15:28:26 -04:00
nairyo
983e083a0b
Center pdf manual zoom mode (#10246)
Center PDF content when its width is smaller than the screen

fix #9967
2023-03-31 17:29:16 +02:00
hius07
fe7b10f18d
Datastorage: do not create unnecessary folders (#10162) 2023-03-02 08:39:09 +02:00
hius07
38bd768d5e
DocSettings: Move book metadata to preferred location (#10149) 2023-03-01 14:52:08 +02:00
melyux
81c0bc396a
Duration format: Add spaces, remove lead zeros for Letters (#10141)
* Add thinspaces between d/h/m/s
* Remove lead zeros
* Make letter `d` for days translatable
* Make thinspace into hairspace when compact
* Adjust and add unit tests
2023-02-22 20:38:57 +01:00
hius07
15605291c2
DocSettings: add support of centralized sdr storage (#10132) 2023-02-17 23:06:55 +02:00