![]() |
#1 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
|
Enforce saving the settings
I use KOreader on an Onyx Boox Nova 3, and my problem is that when I start the update process, and choose the button install, KOreader closes so the update could happen. But it doesn't save the settings first, so I lost everything I did in that session. As a result, I will be back at a previous place in the book on the next restart, without that changes I made in that session. Doesn't an automatic save happen sometimes? Is it possible to invoke it somehow? To work this around, I close and restart KOreader every now and then, but this is not really comfortable.
|
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
IIRC, it's enabled for *document* settings by default (something like every 5/10/15 minutes).
A better solution would be to make sure the Android close-before-update actually does save the settings, which is something that vaguely rings and bell (as in, I think it was fixed like 2 days after the introduction of the revamped Android OTA updates). |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
The fix was in https://github.com/koreader/koreader/pull/7753.
When the download is ready and you click "install" the first thing it does is broadcast a request to save settings (see https://github.com/koreader/koreader....lua#L485-L498). Maybe the broadcast is not received before the app is killed. The broadcast itself ought to work, as is the same used to save settings in the rest of scenarios. |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
|
I tested it a bit more. Yes, the regular save happens and it seems to be 5 minutes. (However, once or twice I lost a lot more reading - an hour at least -, something probably prevented the autosave). Pazos, that broadcast doesn't arrive in time I am afraid, the last update also thrown me back a bit.
|
![]() |
![]() |
![]() |
#5 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
@LittleBig: I reopened https://github.com/koreader/koreader/issues/7724. In the mean time please don't read while the app is being downloaded. Or do read and cancel the prompt, exit your document and check for updates again. Since the update is already downloaded it will prompt again without delay.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
|
"AFAICT the bug cannot be reproduced killing the app (as in: 1. open app, 2. read a few pages 3. kill app from recents)."
Of course it can be reproduced. If I understood you and your comment was related to this problem. No save happening on killing, or actually there is no save before suspending either. If I open the case, start reading, then kill the app, I am thrown back to a location before suspending. |
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@pazos meant "on a sane device". Onyx is known to break a lot of the Android lifecycle assumptions in fun and interesting ways.
|
![]() |
![]() |
![]() |
#8 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Even on a sane device YMMV. Probably a better way of saying the same is: "The bug cannot be reproduced when the onSaveInstanceState callback is triggered".
Last edited by pazos; 07-14-2021 at 05:02 PM. |
![]() |
![]() |
![]() |
#9 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
|
Ah, I see. It makes the development harder, but for book reader point of view there is a definite advantage: my Nova 3 could achieve 30 days with one charge, more than 30 hours on-screen time, never switched off but sent into sleep. I think this is unbelievably good for an Android based ebook reader. It turned out that onyx and koreader could be really great together as koreader is really efficient in resource usage.
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
|
Apparently "flush settings before being killed" did the trick. Thank you.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving Ebook with Viewer Settings | Lucas007 | Calibre | 5 | 02-27-2020 07:13 AM |
Saving Conversion Settings | MrKyle | Conversion | 7 | 04-21-2016 07:29 PM |
Reading Settings not saving | stethorn | Kobo Reader | 1 | 08-30-2015 07:46 PM |
Saving conversion settings? | fitzhugh | Conversion | 6 | 07-18-2012 07:19 PM |
bug or feature? saving conversion settings | BeccaPrice | Calibre | 3 | 06-14-2012 09:01 AM |