2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

848 Commits

Author SHA1 Message Date
weijiuqiao
5d9f036331
Vocabulary builder: add Undo study status (#9528)
Adds button to undo last study operation (got it/forgot)
in more (...).
2022-10-02 02:03:23 +02:00
NiLuJe
62059f8d68
Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA`
* The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)).
* LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths.
* CodeStyle: Require module locals for Lua/C modules, too.
* ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object).
* DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
2022-09-28 01:10:50 +02:00
hius07
b81a407690
Profiles: add QuickMenu (#9526) 2022-09-17 18:11:03 -04:00
NiLuJe
83a2965d6b
Misc: Unify error logging on network errors (#9523)
Making sure we get the relevant information in the logs, and that the UI feedback (if any), is meaningful and readable.
2022-09-17 00:08:00 +02:00
zwim
6cb352bc03
AutoWarmth: nit (#9525) 2022-09-16 20:23:41 +02:00
zwim
813bbe2ec9
AutoWarmth: add a choice to control warmth and/or night mode (#9504) 2022-09-11 19:31:36 +02:00
NiLuJe
8e1bb9bafc
GestureDetector: Full refactor for almost-sane(TM) MT gesture handling (#9463)
Should hopefully make two-contact gestures *much* more reliable, among other things.

See the PR for all the details ;).
2022-09-04 02:38:27 +02:00
Adam Goldsmith
f2b9c5bdaf
NewsDownloader: Strip byte order mark from xml string before parsing (#9468)
Fixes #9467
2022-09-01 12:50:25 +02:00
zwim
615072c777
[AutoWarmth] optimisations and fixes to progressive warmth setting (#9442) 2022-08-24 13:32:16 +02:00
Alex Cabal
39b0ca2f36
Update Standard Ebooks OPDS URLs to new URL (#9371) 2022-08-19 19:20:34 +02:00
zwim
d98fa04d13
[plugin] Fix crash in AutoWarmth (#9411)
Fixes the crash mentioned in https://github.com/koreader/koreader/issues/9409#issuecomment-1207484444?
2022-08-08 11:34:33 +02:00
poire-z
d352579d06
BookMap: allow tap on ToC titles and outside page slots (#9400)
This helps jumping to page when ToC chapters are short
and the bookmap page rows narrow.
Also fix crash when invoking BookMap and PageBrowser
on a PicDocument (considered DocLess by Statistics).
2022-08-03 08:45:45 +02:00
weijiuqiao
30915546f0
vocabbuilder.koplugin: always show more button, add book filtering (#9393)
Always show more button instead of delete regardless of review count per #9383.
Adds book filtering per #9256 (from menu or by swiping up).
2022-07-31 09:02:09 +02:00
zwim
ed34a3078e
AutoWarmth: fix stupid typo (#9382)
See https://github.com/koreader/koreader/pull/9337#issuecomment-1198008045
2022-07-28 14:57:02 +02:00
zwim
9d71333ade
AutoWarmth: add option to toggle/set frontlight on day/night (#9337) 2022-07-28 06:22:25 +02:00
hius07
460d42293a
PathChooser: add creating folder (#9354) 2022-07-27 12:02:37 -04:00
zwim
834dd9682a
AutoWarmth: update footer on menu actions (#9325) 2022-07-14 23:25:11 +02:00
zwim
d522ebe15d
AutoDim: fix timing problems with standby (#9315)
Fix #9303.
2022-07-14 20:08:46 +02:00
zwim
0548eaa95b
CoverImage: fix translatable (#9301)
This PR fixes #9299
2022-07-06 17:15:47 +02:00
zwim
7d73a86a12
AutoWarmth: reduce schedulings for power saving (#9252) 2022-07-06 16:56:30 +02:00
zwim
05c586c4be
AutoWarmth: force setWarmth after resume (#9289) 2022-07-04 06:36:39 +02:00
NiLuJe
c506d8b0ac
AutoSuspend: Some more fixes & cleanups (#9263)
* AutoSuspend: Use the canSuspend devcap check instead of reinventing the wheel.
* Device & UIManager: Cleanup canSuspend devcap check related stuff to avoid boilerplate code.
  (It also now defaults to no, and is explicitly set by device implementations where supported).
* AutoSuspend: Re-engage suspend/shutdown timers when fully charged.
  This restores the existing behavior pre #9036
  (c.f., https://github.com/koreader/koreader/pull/9258#issuecomment-1167672356)
* SDL: Unbreak the fake suspend behavior so that it actually works.
  Tweak the default screensaver message to remind users that Power is bound to F2.
  (Fix #9262)
* AutoSuspend: Re-engage suspend/shutdown timers on unplug.
  This matters on Kobo, because the unexpected wakeup guard might have stopped the suspend timer.
2022-07-02 20:20:35 +02:00
NiLuJe
f0582dd37f
SystemStat: Show awake/suspend/standby breakdown in % (#9257)
Add an "awake" field in the process, and switch to `time` to prevent precision loss ;)
2022-06-27 21:16:51 +02:00
zwim
6d59ca2c6a
AutoStandby: Always reschedule properly (#9258)
If we attempted to switch to standby with an upcoming task in the near future (< 3), we would forget to re-schedule the standby timer.
2022-06-27 21:15:45 +02:00
Utsob Roy
6e647a6f4d
[plugin] Exporter getTitle Fix fix (#9255)
replaced getTitle with newer parseTitleFromPath

Fixes #9253
2022-06-26 09:27:42 +02:00
weijiuqiao
9980827145
Vocabulary builder: fix translatable string and minor UI issue (#9233) 2022-06-25 20:40:37 +02:00
zwim
6fdb83017b
[plugin] AutoDim: reschedule on every tap (#9243)
This is a maintenance PR.
With scheduling the next autodim_check on every tap, we can keep the device longer in standby mode. So we have more power savings.

The long story: The current version works like that:
Let's say I set the idle-time to 3 min and I need 2.5 min to read a page.
Start at 0 min (next scheduled check is at/in 3 min)
Read and tap to turn page after 2.5 min (next scheduled check is at 3 min - in 0.5 min)
At 3 min there is a scheduled_check (wakeup) -> reschedule check in 3 min.
Read and tap to turn page after 2.5 min (no wakeup)
Then after 1 min there is a wakeup -> reschedule.
---> So I get an additional wakeup on every second page.

This PR solves the problem: During normal reading I don't get any wakeup during reading. (The only drawback is, that one function is unscheduled/scheduled on every tap, but that is no big deal).
2022-06-22 18:38:33 +02:00
zwim
83453dfd8f
AutodDim: don't dim if frontlight is off (#9217) 2022-06-17 20:48:37 +02:00
Utsob Roy
74ca6fb317
Better meta parsing for exporter (#9220)
* Get title, author and number of pages from document's metadata
* Add exportable_title parsed from document's title, used in export file generation.
* JSON: export number of pages
2022-06-16 13:54:14 +02:00
NiLuJe
a4f6693919 OPDSBrowser: Handle renderImageData failure in streamPages 2022-06-13 02:37:01 +02:00
weijiuqiao
cafbf36bb2
Vocabulary builder: store word context, other tweaks and fixes (#9195)
Add a copy button and save word context (off by default), shown
via the three-dot menu of word entries.
Also some db refactoring and minor UI improvements:
- a dedicated book title table in order to shrink db size by storing
  references to title names instead of repeated actual strings,
- alignment of different forms of the "more" button and possible
 clipped words in translations.
- fix plugin name so it can be disabled
2022-06-12 21:34:17 +02:00
zwim
def02846ec
AutoDim: Don't update footer if not necessary (#9192) 2022-06-12 19:16:46 +02:00
Martín Fernández
2213e6410f
[plugin] Exporter: fix crash on joplin when token is invalid (#9203)
https://github.com/koreader/koreader/issues/9197#issuecomment-1153129147
2022-06-12 13:12:26 +02:00
Wulf C. Krueger
0f238c3179
Auto frontlight plugin: Newer Oasis models are also supported (#9202)
On a Kindle Oasis 2 and 3 the plugin would be disabled due to not
checking for "KindleOasis2" and "KindleOasis3" respectively.
2022-06-12 12:19:14 +02:00
NiLuJe
2e681353d7 UIManager: Simplify setPMInputTimeout (from #9173)
This was originally designed for finer-grainbed control (specifically,
to correct by the amount of time spent in standby), but the final fix
only ever sets this to 0.

Simplify and rename (consumeInputEarlyAfterPM) to avoid useless computations.
2022-06-12 00:19:45 +02:00
NiLuJe
dcb11c2542
Make luacheck >= 0.26 happy (#9174)
Re: https://github.com/koreader/koreader-base/pull/1487
2022-06-11 19:06:06 +02:00
zwim
5bcd3d0962
[plugin, Terminal] fix crash on clear screen (#9119)
This fixes https://github.com/koreader/koreader/issues/9108#issuecomment-1132243061

Tapping on clear screen during a running program like top, let's KOReader crash.
2022-06-07 21:06:40 +02:00
NiLuJe
73b2b38954
AutoSuspend: Make sure we send a LeaveStandby event ASAP (#9173)
Even in corner cases where we're woken up without user input (e.g., rtc alarm).

(Followup to #9124)
2022-06-07 00:22:22 +02:00
zwim
d868da6977
[plugin, autosuspend] Clean up after #9055 (#9146) 2022-06-05 23:17:38 +02:00
Utsob Roy
6918d62bad
Pretty JSON export (#9165) 2022-06-05 16:52:05 +02:00
Utsob Roy
aa4cc6da56
Exporter: fix remote error (#9167) 2022-06-04 22:10:07 +02:00
weijiuqiao
18db85ea0d
[plugin] Vocabulary builder bugfix and quick word deletion (#9168)
This PR fixes the bug #9162 caused by unsafe db operation and adds an edit mode for quick deletion of words requested at #9132 (comment)
2022-06-04 14:54:58 +02:00
Utsob Roy
c71167fc6b
[plugin] Exporter: add info messages with status (#9166) 2022-06-04 09:37:26 +02:00
Utsob Roy
71c7a8a042
[Android] Highlights share (#9153) 2022-06-03 19:56:10 +02:00
weijiuqiao
ee6197efff
[fix, plugin] Vocabulary builder: prevent resetting changes when reviewing backwards (#9161) 2022-06-03 09:52:39 +02:00
zwim
84c7e33606
AutoDim: Allow to dim the frontlight on idle (#9028) 2022-06-01 16:22:42 +02:00
zwim
b26d3e9815
Autoturn: change to minutes and seconds (#9055)
fix #9051
and add some internal improvements (default values) to the datetimewidget.
2022-06-01 00:04:46 +02:00
weijiuqiao
e1b137339c
[feat, plugin] Vocabulary builder (#9132)
Made the old dictionary lookup history into a flashcard-ish vocabulary builder.
2022-05-31 22:11:35 +02:00
Utsob Roy
6804b77251
Markdown export (#9076)
Enables users to export markdown locally with some configuration options to allow users to format the output to a certain extent.
2022-05-28 10:32:36 +02:00
NiLuJe
ae5b2d68ca
AutoSuspend: Don't send LeaveStandby events from a zombie plugin instance (#9124)
Long story short: the LeaveStandby event is sent via `tickAfterNext`, so if we tear down the plugin right after calling it (in this case, that means that the very input event that wakes the device up from suspend is one that kills ReaderUI or FileManager), what's in UIManager's task queue isn't the actual function, but the anonymous nextTick wrapper constructed by `tickAfterNext` (c.f., 
https://github.com/koreader/koreader/issues/9112#issuecomment-1133999385).

Tweak `UIManager:tickAfterNext` to return a reference to said wrapper, so that we can store it and unschedule that one, too, in `AutoSuspend:onCloseWidget`.

Fix #9112 (many thanks to [@boredhominid](https://github.com/boredhominid) for his help in finding a repro for this ;)).
Re: #8638, as the extra debugging facilities (i.e., ebb81b9845) added during testing might help pinpoint the root issue for that one, too.

Also includes a minor simplification to `UIManager:_checkTasks`, and various other task queue related codepaths (e.g., `WakeupMgr`) ;).
2022-05-25 23:36:41 +02:00