Commit Graph

1111 Commits (master)

Author SHA1 Message Date
hius07 e577c79d95
File search, FileChooser and others (#10994) 7 months ago
NiLuJe 16e96969c5
TimeSync: Double-check that ntpd is busybox (#10992)
Kindle ships another implementation, with incompatible syntax...

Regression since #10935
Thanks to @yparitcher ;).
7 months ago
NiLuJe d039aa5f3a Statistics: Minor style-nit followup to #10968
Too late to avoid the whitespace diff churn, unfortunately ;).
7 months ago
hius07 517731dbbb
Finished books: freeze history timestamp and statistics (#10968) 7 months ago
hius07 0ac258fcb7
Coverbrowser: event for cache refreshing (#10956) 7 months ago
Benoit Pierre 08555ad68b coverbrowser: make showing some metadata fields optional 7 months ago
Benoit Pierre e8bc28db33 coverbrowser: minor simplification
Add a `toggleSetting` helper.
7 months ago
Benoit Pierre 7d3456edc1
[plugin] CoverBrowser: improve title & authors layout (#10942)
- handle possible height overflow
- now that labels don't overflow, increase the minimum font size
7 months ago
NiLuJe 741302445b
TimeSync: Probe for root & ntpd/ntpdate dynamically (#10935)
And, on Kindle, make sure we update the native UI's time, too.

Fix #10932
7 months ago
NiLuJe 34ba2fab30
NetworkMgr: Handle non-blocking turnOnWifi implementations better (#10863)
* Device: Add a `hasSeamlessWifiToggle` devcap to complement `hasWifiToggle`, to denote platforms where we can toggle WiFi without losing focus, as this has obvious UX impacts, and less obvious technical impacts on some of the NetworkMgr innards...
* Android: Mark as `!hasSeamlessWifiToggle`, as it requires losing focus to the system settings. Moreover, `turnOnWifi` returns *immediately* and we *still* run in the background during that time, for extra spiciness...
* NetworkMgr: Ensure only *one* call to `turnOnWifi` will actually go on when stuff gets re-scheduled by the `beforeWifiAction` framework.
* NetworkMgr: Ensure the `beforeWifiAction` framework will not re-schedule the same thing *ad vitam aeternam* if a previous connection attempt is still ongoing. (i.e., previously, on Android, if you backed out of the system settings, you entered the Benny Hill dimension, as NetworkMgr would keep throwing you back into the system settings ;p). This has a few implications on callbacks requested by subsequent connection attempts, though. Generally, we'll try to honor *explicitly interactive* callbacks, but `beforeWifiAction` stuff will be dropped (only the original cb is preserved). That's what prevents the aforementioned infinite loop, as the `beforeWifiAction` framework was based on the assumption that `turnOnWifi` somewhat guaranteed `isConnected` to be true on return, something which is only actually true on `hasWifiManager` platforms.
* NetworkMgr: In `prompt` mode, the above implies that the prompt will not even be shown for concurrent attempts, as it's otherwise extremely confusing (KOSync on Android being a prime example, as it has a pair of Suspend/Resume handlers, so the initial attempt trips those two because of the focus switch >_<").
* NetworkMgr: Don't attempt to kill wifi when aborting a connection attempt on `!hasSeamlessWifiToggle` (because, again, it'll break UX, and also because it might run at very awkward times (e.g., I managed to go back to KOReader *between* a FM/Reader switch at one point, which promptly caused `UIManager` to exit because there was nothing to show ;p).
* NetworkMgr: Don't drop the connectivity callback when `beforeWifiAction` is set to prompt and the target happens to use a connectivity check in its `turnOnWifi` implementation (e.g., on Kindle).
* Android: Add an `"ignore"` `beforeWifiAction` mode, that'll do nothing but schedule the connectivity check with its callback (with the intent being the system will eventually enable wifi on its own Soon(TM)). If you're already online, the callback will run immediately, obviously. If you followed the early discussions on this PR, this closely matches what happens on `!hasWifiToggle` platforms (as flagging Android that way was one of the possible approaches here).
* NetworkMgr: Bail out early in `goOnlineToRun` if `beforeWifiAction` isn't `"turn_on"`. Prompt cannot work there, and while ignore technically could, it would serve very little purpose given its intended use case.
* KOSync: Neuter the Resume/Suspend handlers early on `CloseDocument`, as this is how focus switches are handled on Android, and if `beforeWifiAction` is `turn_on` and you were offline at the time, we'd trip them because of the swap to system settings to enable wifi.
* KOSync: Allow `auto_sync` to be enabled regardless of the `beforeWifiAction` mode on `!hasSeamlessWifiToggle` platforms. Prompt is still a terrible idea, but given that `goOnlineToRun` now aborts early if the mode is not supported, it's less of a problem.
8 months ago
hius07 684fc22ffc
TextViewer: font size (#10911) 8 months ago
poire-z f78a8c5315
Custom metadata: update Statistics db on metadata change (#10894) 8 months ago
hius07 108d87742a
Custom metadata: fixes (#10889) 8 months ago
hius07 6efcf96b75
copt deduplicate: font_size, visible_pages (#10882) 8 months ago
hius07 7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 8 months ago
hius07 73378cd9d7
copt deduplicate: line_spacing (#10768) 8 months ago
hius07 e4ba8c7909
Custom metadata: event (#10869) 8 months ago
hius07 cbcf03b1af
Exporter: custom metadata (#10874) 8 months ago
hius07 912ae156f7
copt deduplicate: smooth_scaling, nightmode_images (#10801)
Main discussion in #10763.
8 months ago
NiLuJe 4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
8 months ago
zwim bedd422669
AutoSuspend: Handle a few corner-cases better (#10797)
* Enforce a minimal standby timer for the first standby after a resume.
* On Kobo, sleep a bit before standby.

This aims to alleviate race conditions causing visible refresh glitches on sunxi, especially when using an extremely low standby timer (i.e., below the defaults).
8 months ago
hius07 ed2ea6803f
Custom metadata (#10861) 8 months ago
hius07 1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
8 months ago
NiLuJe a736a3ebe0
Calibre: Add reading status to the metadata search popups (#10842)
We're getting old, remembering whether you've actually read stuff is hard ;).
8 months ago
NiLuJe 6fa8e1d2fd
KOSync: Set sane socket timeouts properly (#10835)
An attempt was made in the original code, but the whole thing was designed in the hope of actually switching to turbo, so it was super janky without it.
Anyway, we now actually have a sane way to set socket timeouts, so, use that, and set them very tight for now.

This is fairly critical right now, because the server is down, and the default timeouts are ~30s. That happens to be *above* the debounce threshold, so you can't even hope for that to help you. Meaning, right now, you get a 2 * 30s block on resume with auto sync. That's... Very Not Good(TM).

That becomes a single 2s one after this.
9 months ago
hius07 f4f5af5f2d
Exporter: fix order for Readwise (#10824)
Exported highlights are good sorted by position, page numbers could be wrong.
Closes #10817.

For reference: https://readwise.io/api_deets
9 months ago
hius07 0499b5109a
Profiles: fix New profile with current pdf document settings (#10778) 9 months ago
melyux 493a60faef
Exporter: Replace newlines with commas in HTML, Readwise (#10788)
Resolves #10755.
9 months ago
NiLuJe 38aa74ec7c
KOSync: Only nag about "Action when Wi-Fi is off" when toggling (#10785)
auto-sync *on*

Fix #10784
9 months ago
zwim 2ba3353d8a
[AutoWarmth] use CheckButton for night mode toggle (#10762) 9 months ago
weijiuqiao 416237e526
Statistics: Attempt to prevent rampant replication of null id_books (#10749)
And add an OTM block to do a cleanup pass on existing DBs (which might take a while if you're severely affected, because we've seen reports of DBs north of 2GB).
9 months ago
poire-z 626864f856 [chore] replace utf8 bytes with Unicode escape sequence 9 months ago
hius07 7164bc2bd9
Exporter: fixes (#10765) 9 months ago
hius07 b36ccc7249
QuickMenu: add long-press on profile (#10671) 9 months ago
clach04 500eadf895
[plugin] Wallabag: strip trailing slashes from server URL (#10715)
Fixes #9187.
9 months ago
hasezoey d087710140
Autowarmth: Change strings "set" / "unset" to "turn on" / "turn off" where appropriate (#10733) 10 months ago
hius07 3e43a21cf2
ArchiveViewer: view files (#10683) 10 months ago
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...
10 months ago
hius07 b33971b92d
OPDS fixes (#10657) 10 months ago
hius07 86f4b3c18d
QuickMenu: anchor to gesture position 3 (#10646) 10 months ago
Frans de Jonge 2b18a7e90f
[i18n]KOSync: use already translated "Not available" instead of "Unavailable" (#10648)
Cf. https://github.com/koreader/koreader/pull/10605#discussion_r1252639047
10 months ago
hius07 adfbbd9903
Disabled touch input: always active gestures (#10624) 10 months ago
NiLuJe 08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
10 months ago
hius07 5db765e4e5
correct parsing unzip output (#10625) 10 months ago
Frans de Jonge b8af326836
[i18n,plugin]Statistics: differentiate different types of 'reset' (#10621)
References <https://github.com/koreader/koreader/discussions/10479>.
10 months ago
hius07 54ab0a04f8
Archive viewer (#10584) 11 months ago
zwim 3e3cc690f3
Fix regression after 10557 (#10570) 11 months ago
hius07 3eee5dd14c
OPDS: view book cover (#10555)
(1) New "Book cover" button in the download dialog.
(2) Detect book that can be borrowed only (Internet Archive).
There is no support for borrowing, just showing a disabled button.
(3) Fixed some libraries, all of them work except Gallica.
11 months ago
zwim c9e1b76a14
[plugin] AutoWarmth: Fix nightmode issue on non natural light devices (#10556)
This should fix #10491.
11 months ago
zwim 1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
11 months ago
hius07 fc7181419f
CoverImage: custom cover support (#10553) 11 months ago
hius07 01e6593dd4
File popup dialog buttons (#10537) 11 months ago
hius07 6cb245f86f
MoveToArchive register to Dispatcher (#10524) 11 months ago
Glen Sawyer 128f205324
[plugin] Statistics: fix sync caused by semicolon in SQL comment (#10503)
Follow-up to <https://github.com/koreader/koreader/pull/10498>.
11 months ago
Glen Sawyer 2aa11b13ad
[plugin] Statistics: sync the `last_open` field (#10498) 11 months ago
Frans de Jonge 710614752d
[doc, plugin] Exporter: manually specify module name (#10465)
Follow-up to <https://github.com/koreader/koreader/pull/10464>.
12 months ago
hius07 09425ea729
Exporter: fix comment for ldoc (#10464) 12 months ago
hius07 3d5775241d
Exporter: selected files (#10453)
Export highlights for selected files.
Having a button "Select all files in folder", it is easy to export the whole folder.
So, closes #10402.

To keep even number of buttons, added a feature "Show selected files list". May be useful to check selections before an operation. Just a sorted list, no titlebar or popup menu, tapping a file jumps to its folder.
12 months ago
hius07 7ab832081b
[plugin] Exporter: choose folder (#10448)
Default is still koreader/clipboard.
12 months ago
夏鲁豫 4c9231a8f8
[plugin] Exporter: add memos export (#10411)
Add an export method for memos, which originates from [flomo](https://flomoapp.com/) and now has an open-source self-deployment solution:[memos](https://github.com/usememos/memos)
12 months ago
hius07 8665929a5e
Exporter: correct access to doc settings (#10407) 1 year ago
zwim d718682502
Autowarmth: suntime.lua minimal documentation update (#10405) 1 year ago
Frans de Jonge 3da24046c0
[plugin] Exporter: avoid passing newlines to translators (#10400) 1 year ago
poire-z 2aeb4a87df
Statistics: fix ReaderProgress bad layout in RTL UI (#10389) 1 year ago
hius07 4f23a6fafa
Custom book covers (#10329) 1 year ago
zwim 662bd65a5f
Fix some screen refresh effects (#10306) 1 year ago
Mochitto 0db042fd0c
Fix crash exporting to Markdown with missing authors (#10278) 1 year ago
Mochitto 53079441f9
Fix: exporting all notes and single doc now both use metadata for author and title (#10280) 1 year ago
Mochitto c0615c3bda
Feature: Export to kindle's myClippings (#10263)
* Feature: Added the possibility to export using kindle's myClippings formatting
* Fix: files that have the same extension don't collide anymore
1 year ago
hius07 fd8cb14c00
CoverBrowser: fix getting cached info (#10346) 1 year ago
weijiuqiao 34c2dab54b
statistic.koplugin: fix today's timeline showing next day when within custom offset (#10299)
Continuing https://github.com/koreader/koreader/pull/10254#issuecomment-1494697269
1 year ago
zwim 4dbaca180a
PM: Optimize task queue handling around standby (#10203)
Instead of firing on(Enter|Leave)Standby Events, and having every other piece of code that might care about that handle re-scheduling their stuff themselves; simply make the standby implementation (i.e., AutoSuspend's) shift the whole task queue by the amount of time spent in standby to re-sync everything automatically.

(This is necessary in the first place because Linux, as the task queue ticks in CLOCK_MONOTONIC, which does *not* tick during suspend/standby; while we expect most of the tasks scheduled to actually reflect real world clock delays).
1 year ago
weijiuqiao 86ddfc856d
SSH.koplugin: fix cant stop SSH server bug when pid file's stale (#10300)
Fixes #9812.
1 year ago
hius07 483a005cc2
File browser: show Folder Menu on long-press on Home icon (#10298) 1 year ago
poire-z 7c5c7bb9cf Calendar view's day view: thicker separator at 00:00
When using the new option "Daily timeline starts at",
make the separator line between 23:00 and 00:00 thicker.
Also tweak time picker to pick minutes by units of 10,
and remove max hour (06:00) limitation.
1 year ago
hius07 b7c4e1c21b
ListMenu: show mark for books with highlights (#10276) 1 year ago
hius07 34ab0d8ac6
Folder Menu: sign for Home folder (#10288) 1 year ago
Mochitto d39cc78f9c
[plugin] Exporter: use util.getSafeFilename() to remove illegal characters from output filename (#10282)
Fixes #10281.
1 year ago
Piotrek Marciniak 2e630286df
Sync book statistics: add to dispatcher (#10285) 1 year ago
weijiuqiao 5648c942c1
Calendar view: add options to change start time of days (#10254)
Can be set for example to 04:00 to see after-midnight readings
with those of the previous evening in day timeline.
Also fix possible shifts in day start when crossing DST changes
with prev/next.
Also fix sorting (by reverse reading duration) of books at top
1 year ago
Mochitto 3a894f954c
Fix: Updated legacy directory, which crashed the program (#10260)
Fixes #10259
1 year ago
hius07 4d26650ad6
Filesearcher: add search in book metadata (#10198) 1 year ago
hius07 aedb713f82
Menu widget: cleanup (#10241) 1 year ago
poire-z f0122cf457 Button: handle 'width' as the final outer width
All our widgets are considering their provided 'width'
as the outer width, except Button which considered it
as some 'inner width', to which padding/border/margin
were added. Let's have them all consistent.
Some other widgets using Button had tweaks to account
for that odd behaviour: fix and simplify them.
Also fix Button layout when text is left aligned.
1 year ago
hius07 cc3e48fa3a
Coverbrowser: unify display modes (#10188) 1 year ago
weijiuqiao 6267249b1e
vocabbuilder: fix reset word progress bug (#10195)
fixes #10194.
1 year ago
hius07 a3d42ac344
Classic display mode: add popup file dialog buttons (#10185) 1 year ago
Frans de Jonge 4e78b081f9
[i18n] Calibre plugin: improve clarity for translators (#10172)
The path list will start with \n already, but an extra newline
won't hurt and this string is really weird (i.e., people will
naturally put a space or a newline in front of it).
1 year ago
hius07 38bd768d5e
DocSettings: Move book metadata to preferred location (#10149) 1 year ago
hius07 55f1b8c974
UX: a set of minor fixes (#10165)
- AutoFrontlight plugin: update checkmark on toggling
- KeepAlive plugin: update checkmark on toggling
- ReaderPageMap: font size menu entry
- ReaderStatus, common_settings_menu_table: book status "read" -> "finished"
1 year ago
Frans de Jonge 26dc43553b
[fix] CoverBrowser: fix calling upvalue crash in MosaicMenu (#10164)
Regression introduced in #10140.
1 year ago
Frans de Jonge 03a9551565
[i18n, plugin] Exporter: fix some incorrect uses of translation (#10159)
Fixes #9231.
1 year ago
hius07 5c9ba53353
History: update last book access time (#10156) 1 year ago
hius07 54fc6533b1
MoveToArchive fix DocSettings (#10152) 1 year ago
hius07 d38c71a7bc
Wallabag: fix doc settings (#10147) 1 year ago
melyux 55259846a8
Fix N_() usages, rearrange a SQL select (#10146)
Fix some of my early blunders in using the `N_()` gettext function. Mini-PR from https://github.com/koreader/koreader/pull/9924#discussion_r1104298501 (@Frenzie).

There was also one line for generating this same `%1 (%2 pages)` text that confusingly uses different ordering in the SQL query output; switched the two SELECT arguments around to make it match the other 5 usages. Works the same as before
1 year ago
hius07 5cf72b6eea
MosaicMenu: correct access to doc settings (#10140) 1 year ago
hius07 15605291c2
DocSettings: add support of centralized sdr storage (#10132) 1 year ago
melyux e55b60175b
CoverBrowser Mosaic: improve book status, floating progress bar (#9939)
- New dogear icons in Mosaic cover view to indicate each
  possible book status: 'Reading', 'On hold', 'Finished'
- Progress bar redesigned to be floating, taller, thicker
  bordered in Mosaic cover view
- Don't show progress bar if book is finished
- FakeCover bottom text (filename) adjusted to not overlap
  with progress bar and dogear if they exist
- Mosaic book shortcut letter moved from bottom left to
  top left
1 year ago
hius07 d1081fa982
Docsettings: add centralized sdr storage (#10074)
Added an option to choose a new location to save document settings, highlights and bookmarks 
(koreader/docsettings folder).
1 year ago