UIManager: get rid of self._running and self._run_forever#9669
Conversation
| Device:saveSettings() | ||
| Device:powerOff() | ||
| self:quit(Device:isKobo() and 88) | ||
| self:quit(Device:isKobo() and 88 or nil) |
There was a problem hiding this comment.
Oh, right, good point, devcaps eval to true or false, not true or nil ;).
There was a problem hiding this comment.
In this special case I would prefer to write:
if Device:isKobo() then
self:quit(88)
else
self.quit()
end
|
|
||
| -- Disable automatic UIManager quit; for testing purposes | ||
| function UIManager:setRunForeverMode() | ||
| self._gated_quit = function() return false end |
There was a problem hiding this comment.
I don't recall if the testsuite ever unloads UIManager, so, we may need a way to restore the standard wrapper, too?
There was a problem hiding this comment.
The test suite does a package.unloadAll() on most (all?) setup functions. On my laptop and CircleCi finish without error.
So the answer is probably: No, we don't need to have a restore functionallity.
(But I will implement these three lines for completeness.)
|
Ready to merge? |
NiLuJe
left a comment
There was a problem hiding this comment.
Goddamit GH review UI. Forgot to hit the big green button yet again. -_-".
Fix koreader#9887, likely a regression since koreader#9669
Fix koreader#9887, likely a regression since koreader#9669
Fix koreader#9887, likely a regression since koreader#9669
Fix koreader#9887, likely a regression since koreader#9669
@NiLuJe Is this what you wished in #9657?
This change is