Statistics: actions to enable/disable#13387
Conversation
|
Also minor fix to Profiles plugin, to address @mergen3107 's #12547 (comment). |
| UIManager:nextTick(function() | ||
| if self.settings.is_enabled then | ||
| self.data = config:readSetting("stats", { performance_in_pages = {} }) | ||
| self.doc_md5 = config:readSetting("partial_md5_checksum") | ||
| -- we have correct page count now, do the actual initialization work | ||
| self:initData() | ||
| self.view.footer:maybeUpdateFooter() | ||
| end | ||
| end) |
There was a problem hiding this comment.
Hard (and no time from me) to check for any side effects, but be ultra sure there's no issue delaying all of this until nextTick (including accounting the opening page for statistics).
There may be lots of stuff happening between ReaderReady and its next tick (ie. all the postReaderReadyCallback stuff).
There was a problem hiding this comment.
all the postReaderReadyCallback stuff
3 calls only, and it looks more correct to begin the staistics after them:
koreader/frontend/apps/reader/modules/readerrolling.lua
Lines 190 to 196 in 9f61c23
koreader/frontend/apps/reader/modules/readerlink.lua
Lines 121 to 124 in 9f61c23
koreader/frontend/apps/reader/modules/readerannotation.lua
Lines 134 to 139 in 9f61c23
|
@mergen3107 you can test it, the Statistics can be disabled on book opening. |
|
Thanks, @hius07 |
|
@hius07
This is exactly how I imagined it to be :) |
Statistics: actions to enable/disable
In addition to toggle.
This change is