Function `SetSubtaskInfo` takes only chars as a valid book. Since
filename can be `nil` (not a char) the crash would happen. This
Change avoids the crash by using a char type nil value. See:
`int SetSubtaskInfo(int task, int subtask, const char *name, const char *book);`
Fixes#8053Fixes#8392 too
Fixes#8743 last issue
Currently the progress sent to the server can be either a string or an int (depending on whetther the document has pages).
The following are both payload sent from koreader to the server.
```
{"percentage":0.005,"device":"device_name","device_id":"B78EA04ACC3A453DBA220D720C0BE102","document":"348e34463a44ba68659fc6fe814a6778","progress":3}
```
where document `348e34463a44ba68659fc6fe814a6778` is a pdf file.
```
{"percentage":1,"device":"device_name","device_id":"B78EA04ACC3A453DBA220D720C0BE102","document":"4eb484b229696cb39cd8fe5495aa1bbe","progress":"\/body\/DocFragment[30]\/body\/p\/img.0"}
```
where document `4eb484b229696cb39cd8fe5495aa1bbe` is an epub file.
This may add extra work to the backend server. A few commits were added to my personal fork of [kosyncsrv](https://github.com/yeeac/kosyncsrv) (a kosync backend server). kosyncsrv initially tries to decode progress as a string. It then failed on document with pages (in which, progress is just integer page number). I then change the field's type, only to [revert it later](8a642e31a0).
I believe it is more appropriate for us to fix the progress type to string.
With the inkview library inverting the screen seems possible but needs some
discussion with the developers of Pocketbook. For now disable HWInvert so
this feature is not broken while we figure out how to change the invert with inkview.
(1) ButtonDialogTitle: new method setTitle()
(2) OPDSbrowser
-use setTitle() instead of open/close ButtonDialogTitle (no visual changes to the download dialog)
-reduce logger.info output to avoid flooding crash.log
(3) CloudStorage
-enhance download dialog (similar to OPDS), much optimized code of downloadFile
-fix a bug: cannot create new folder or upload files to the root of the Dropbox storage
Make it a real Document property, updated at init & toggle time.
Also, simplify a bunch of redundant nested lookups in ReaderView
(self.ui.view is self, self.ui.document is self.document).
Temporary (?) workaround for the Libra 2 EPDC race issues,
since we haven't really found any better solution,
and so far, newer kernels haven't really helped...
Re #8414
Instead of using the depth configured in Book map, start
with max depth, and allow decreasing (and reseting when
at 0) with long-press on the (i) top left icon.