2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
NiLuJe
83e148bc9e
Tests: Make a few things more deterministic (#6991)
This way we still get the passed/expected actual values in Busted's
output

Which helps not make this any more maddening than it already is to
update...
2020-12-15 21:10:36 +01:00
NiLuJe
32bf53cfdf
ReaderFooter: Don't duplicate a 12h clock time format option (#6973)
* ReaderFooter:
	* Honor the global twelve_hour_clock setting, instead of
	  duplicating a local one.
	  (Re #6969)

* os.date is a thin wrapper around strftime, so we might be able to get
away with some not-quite-standard extensions...

These are *definitely* supported on Linux, but are *NOT* the glibc
extension (that'd be e.g., %-I), so, hopefully, they're somewhat
portable...

They are also supported on BSD/macOS.
They are *not* supported by the MS UCRT. That means MinGW-w64, too.
This *appears* to be supported on current Bionic (it might even support
said glibc format altering extensions).

* And of course, Windows is terrible, so, make this terribly ugly to not
break it there...

* Turns out BSD also supports the dash trim format extension, so, leave
the trimming to the libc, and handle the special-casing in a way that
doesn't create stupid locals.

* Random unrelated cleanup ^^.

(https://gitter.im/koreader/koreader?at=5fd24be492aa1c4ef5d11f31)

* Update the testsuite

(Because the default used to be 24h clock).

Changed the default to 24h clock ;p.

* Explain why we don't try to fix it in Lua
2020-12-12 10:44:35 +01:00
NiLuJe
99045b4311
Minor util & ffi/util cleanups (#6657) 2020-09-15 20:39:32 +02:00
poire-z
cfa45f8d88 History: show last read date instead of file size
In classic and list display modes.
2020-08-29 20:07:26 +02:00
NiLuJe
9abd92044a
Make sure "Clear history of deleted files" actually persists. (#6557)
* Make sure "Clear history of deleted files" actually persists.

The current code was only clearing the live table, it was forgotten after a restart.
2020-08-25 01:47:04 +02:00
poire-z
17c686628c History: fix possible issues when saving and loading
Internal self.hist being an array, iterating it with 'pairs'
could have some strange effects. Best to use 'ipairs'.
2020-05-29 15:07:14 +02:00
poire-z
46221985a6
Delegate "lastfile" management to ReadHistory (#6128)
Simplify (and avoid edge cases) in other code by having
ReadHistory manage the "lastfile" setting on add, remove,
rename...
Fixed a few other cases of things not updated.
2020-05-06 21:11:34 +02:00
poire-z
04d9a557aa Use fsync() for more robust setting files saving
Bump base for util.fsyncOpenedFile() and util.fsyncDirectory().

Use these to force flush to storage device when
saving luasetting, docsetting, and history.lua.
Also dont rotate them to .old until they are at least
60 seconds old.
Also make auto_save_paging_count count right.

Also bump crengine: open (as text) small or empty files
2019-12-10 23:57:32 +01:00
Frans de Jonge
a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
2019-08-23 19:53:53 +02:00
poire-z
9afe3da6c2 History: show files sizes, as File browser does 2019-01-01 20:19:09 +01:00
alethiophile
4c8ef61477 Fix sort-by-last-read when partition is mounted noatime (#3990) 2018-05-30 06:50:15 +02:00
Robert
a66d657195 Update History and Last open document when move (cut and paste) file (#3607) 2018-01-16 18:20:25 +01:00
poire-z
4d18ac1100 Some History fixes and enhancements (#3247)
Made the onHold buttons table similar to the one of File browser.
Added "Purge .sdr" and "Delete" to these buttons.
Moved the purgeSettings and removeFileFromHistoryIfWanted
logic into filemanagerutil functions.
Stay on the same page when manipulating history (previously, we were
always put back on first page).
Really keep deleted files in history (unless setting says otherwise).
Show deleted files in grey or dimmed in classic History and all
CoverBrowser display modes.
2017-09-22 18:24:38 +02:00
Hzj_jie
d6845d94b1 ReadHistory: support reload (#3003)
Allows ReadHistory to reload according to the modification timestamp of history.lua.
2017-07-19 14:56:17 +02:00
Frans de Jonge
da3ff5e336 History: add 'autoremove_deleted_items_from_history' setting 2017-02-25 16:39:23 -08:00
Frans de Jonge
827e77afbe FileManagerHistory: fix loop error 2017-02-25 16:39:23 -08:00
Frans de Jonge
2c80ff7d7b FileManagerHistory: remove harmful deletion code and turn it into a feature
Fixes the problem introduced in 51327911f2 and turns it into a feature that should fix #2477
2017-02-25 16:39:23 -08:00
Zijie He
ced671bc69 Add readhistory_spec / docsettings_spec 2016-09-12 20:04:13 -07:00
Hzj_jie
7493fc89f6 Add removed item name in "Remove this item from history" and fix wrong items deleted issue. (#2164)
* Add removed item name in "Remove this item from history".

* Fix #2162, wrong history items deleted.
2016-07-18 22:37:57 -07:00
Hzj_jie
51327911f2 Won't track missing files in history, and always keep latest timestamp 2016-04-21 20:37:16 -07:00
Zijie He
667e8834ad Migrate history folder, FileManagerHistory uses own history.lua file and ReadHistory component 2016-04-20 22:44:44 -07:00