@ -83,15 +83,16 @@ function ReaderCoptListener:updateHeader()
-- Have crengine display accurate time and battery on its next drawing
-- Have crengine display accurate time and battery on its next drawing
self.ui . rolling : updateBatteryState ( )
self.ui . rolling : updateBatteryState ( )
self.ui . document : resetBufferCache ( ) -- be sure next repaint is a redrawing
self.ui . document : resetBufferCache ( ) -- be sure next repaint is a redrawing
-- Force a repaint (we could avoid it if the top menu is shown as it
-- Force a refresh if we're not hidden behind another widget
-- would fully cover the header, but let's not bother)
if UIManager : getTopWidget ( ) == " ReaderUI " then
UIManager : setDirty ( self.view . dialog , " ui " ,
UIManager : setDirty ( self.view . dialog , " ui " ,
Geom : new {
Geom : new {
x = 0 , y = 0 ,
x = 0 , y = 0 ,
w = Device.screen : getWidth ( ) ,
w = Device.screen : getWidth ( ) ,
h = self.ui . document : getHeaderHeight ( ) ,
h = self.ui . document : getHeaderHeight ( ) ,
}
}
)
)
end
end
end
function ReaderCoptListener : unscheduleHeaderRefresh ( )
function ReaderCoptListener : unscheduleHeaderRefresh ( )